pythia-plsql 0.3.2__tar.gz → 0.3.4__tar.gz

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 (39) hide show
  1. {pythia_plsql-0.3.2/scripts/pythia_plsql.egg-info → pythia_plsql-0.3.4}/PKG-INFO +1 -1
  2. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/pyproject.toml +1 -1
  3. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/scripts/pythia.py +15 -9
  4. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4/scripts/pythia_plsql.egg-info}/PKG-INFO +1 -1
  5. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/skills/pythia-explore/SKILL.md +12 -3
  6. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/tests/test_install.py +23 -0
  7. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/LICENSE +0 -0
  8. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/README.md +0 -0
  9. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/queries/compile-errors.sql +0 -0
  10. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/queries/dependencies.sql +0 -0
  11. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/queries/impact.sql +0 -0
  12. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/queries/invalid-objects.sql +0 -0
  13. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/queries/name-occupants.sql +0 -0
  14. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/queries/object-source.sql +0 -0
  15. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/queries/plscope-enabled.sql +0 -0
  16. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/queries/plscope-statements.sql +0 -0
  17. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/queries/plscope-usages.sql +0 -0
  18. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/queries/session-privileges.sql +0 -0
  19. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/queries/similar-candidates.sql +0 -0
  20. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/queries/source.sql +0 -0
  21. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/scripts/pythia_plsql.egg-info/SOURCES.txt +0 -0
  22. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/scripts/pythia_plsql.egg-info/dependency_links.txt +0 -0
  23. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/scripts/pythia_plsql.egg-info/entry_points.txt +0 -0
  24. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/scripts/pythia_plsql.egg-info/requires.txt +0 -0
  25. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/scripts/pythia_plsql.egg-info/top_level.txt +0 -0
  26. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/setup.cfg +0 -0
  27. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/skills/pythia-apply/SKILL.md +0 -0
  28. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/skills/pythia-explore/reference/data-dictionary.md +0 -0
  29. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/skills/pythia-impact/SKILL.md +0 -0
  30. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/skills/pythia-review/SKILL.md +0 -0
  31. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/skills/pythia-review/reference/antipatterns.md +0 -0
  32. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/skills/pythia-setup/SKILL.md +0 -0
  33. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/skills/pythia-skill-author/SKILL.md +0 -0
  34. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/skills/pythia-write/SKILL.md +0 -0
  35. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/skills/pythia-write/reference/patterns.md +0 -0
  36. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/tests/test_phase1.py +0 -0
  37. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/tests/test_phase2.py +0 -0
  38. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/tests/test_phase3.py +0 -0
  39. {pythia_plsql-0.3.2 → pythia_plsql-0.3.4}/tests/test_phase5.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pythia-plsql
3
- Version: 0.3.2
3
+ Version: 0.3.4
4
4
  Summary: PL/SQL development for AI agents on Oracle Database - expert data-dictionary queries, impact analysis, and a snapshot-verified write path with honest rollback.
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/thaildhe172591/pythia
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pythia-plsql"
7
- version = "0.3.2"
7
+ version = "0.3.4"
8
8
  description = "PL/SQL development for AI agents on Oracle Database - expert data-dictionary queries, impact analysis, and a snapshot-verified write path with honest rollback."
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -1659,20 +1659,26 @@ def global_pack_present(home=None):
1659
1659
  def copy_bundled_skills(base_dir):
1660
1660
  """No-Node fallback: copy the wheel-bundled pack into
1661
1661
  <base>/.claude/skills/ ONLY — the directory Claude Code reliably reads
1662
- in both scopes (field evidence: project .agents/skills is invisible to
1663
- some Claude Code versions, and a second copy doubles every menu entry).
1664
- base_dir is the project root, or the home directory for -g. The copy
1665
- merges: only the pack's own skills are refreshed; stale copies of the
1666
- pack under .agents/skills and old plsql-* names are cleaned."""
1662
+ in both scopes (field evidence: a project's .agents/skills is invisible
1663
+ to some Claude Code versions, and a second copy doubles every menu
1664
+ entry). base_dir is the project root, or the home directory for -g.
1665
+
1666
+ Both destinations are cleared link-first before the copy. An earlier
1667
+ `npx skills add` leaves .claude/skills/<name> as a symlink into
1668
+ .agents/skills/<name>; copying into that symlink would write through to
1669
+ its target, which the .agents cleanup then deletes — leaving a dangling
1670
+ link and no pack at all. Only the pack's own names are touched; other
1671
+ skills in those directories are left alone."""
1667
1672
  import shutil
1668
- dest_root = pathlib.Path(base_dir) / ".claude" / "skills"
1673
+ base = pathlib.Path(base_dir)
1674
+ dest_root = base / ".claude" / "skills"
1669
1675
  for pack in sorted(SKILLS_DIR.iterdir()):
1670
1676
  if not (pack / "SKILL.md").is_file():
1671
1677
  continue
1672
- shutil.copytree(pack, dest_root / pack.name, dirs_exist_ok=True)
1678
+ _remove_link_first(dest_root / pack.name)
1679
+ _remove_link_first(base / ".agents" / "skills" / pack.name)
1680
+ shutil.copytree(pack, dest_root / pack.name)
1673
1681
  clean_legacy_skills(base_dir)
1674
- for name in pack_names(): # canonical copy lives in .claude now
1675
- _remove_link_first(pathlib.Path(base_dir) / ".agents" / "skills" / name)
1676
1682
  return [dest_root]
1677
1683
 
1678
1684
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pythia-plsql
3
- Version: 0.3.2
3
+ Version: 0.3.4
4
4
  Summary: PL/SQL development for AI agents on Oracle Database - expert data-dictionary queries, impact analysis, and a snapshot-verified write path with honest rollback.
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/thaildhe172591/pythia
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pythia-explore
3
- description: Use when you need to understand anything in an Oracle schema - finding objects, reading PL/SQL source, signatures, table columns, DDL, searching code, or asking who uses what. The database is the only source of truth; repo dumps and exports drift and lie.
3
+ description: Use when you need to understand anything in an Oracle schema - finding objects, reading PL/SQL source, signatures, table columns, DDL, searching code, or asking who uses what. ALSO use when a .sql file, dump, export, migration script or repo copy of an object appears to answer the question already, including when the developer points you at one: those files drift from the database and are wrong in ways that read as correct. The database is the only source of truth.
4
4
  ---
5
5
 
6
6
  # Exploring the Schema
@@ -22,8 +22,17 @@ database:
22
22
  | **Indexes** | **116** | **1,016** | **~89% missing** |
23
23
 
24
24
  Code that "reads fine" against the dump can reference types and packages the
25
- dump never heard of. Read files only when the database is unreachable, or to
26
- compare a repo version against the live one.
25
+ dump never heard of.
26
+
27
+ **When the developer hands you a `.sql` file** — "explain this procedure",
28
+ "here is the export, what does it do" — the file is a claim, not the truth.
29
+ Read it, then run `pythia src <NAME>` and answer from the database. If the
30
+ two differ, say so first: which is newer is exactly what the developer needs
31
+ to know, and it is invisible from the file alone. Never answer about a
32
+ database object from a file alone while the database is reachable.
33
+
34
+ Read files as the answer only when the database is unreachable — and say
35
+ that is what you are doing.
27
36
 
28
37
  ## What you need → what you run
29
38
 
@@ -65,6 +65,29 @@ def test_missing_npx_falls_back_to_the_bundled_pack():
65
65
  pythia.copy_bundled_skills(td) # idempotent
66
66
 
67
67
 
68
+ def test_copy_survives_a_symlinked_destination():
69
+ """`npx skills add` leaves .claude/skills/<name> as a symlink into
70
+ .agents/skills/<name>. Copying through that link and then cleaning the
71
+ target left dangling links and no pack — it happened on a real machine."""
72
+ with tempfile.TemporaryDirectory() as td:
73
+ base = pathlib.Path(td)
74
+ agents = base / ".agents" / "skills" / "pythia-explore"
75
+ claude = base / ".claude" / "skills"
76
+ agents.mkdir(parents=True)
77
+ (agents / "SKILL.md").write_text("old", encoding="utf-8")
78
+ claude.mkdir(parents=True)
79
+ try:
80
+ (claude / "pythia-explore").symlink_to(agents,
81
+ target_is_directory=True)
82
+ except (OSError, NotImplementedError):
83
+ return # no symlink privilege on this box; skip
84
+ pythia.copy_bundled_skills(td)
85
+ real = claude / "pythia-explore" / "SKILL.md"
86
+ assert real.is_file(), "pack vanished through the symlink"
87
+ assert not (claude / "pythia-explore").is_symlink()
88
+ assert "old" not in real.read_text(encoding="utf-8")
89
+
90
+
68
91
  def test_global_pack_detection_skips_project_copies():
69
92
  with tempfile.TemporaryDirectory() as home:
70
93
  assert not pythia.global_pack_present(home)
File without changes
File without changes
File without changes