pythia-plsql 0.3.0__tar.gz → 0.3.1__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.0/scripts/pythia_plsql.egg-info → pythia_plsql-0.3.1}/PKG-INFO +1 -1
  2. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/pyproject.toml +1 -1
  3. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/scripts/pythia.py +17 -5
  4. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1/scripts/pythia_plsql.egg-info}/PKG-INFO +1 -1
  5. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/LICENSE +0 -0
  6. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/README.md +0 -0
  7. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/queries/compile-errors.sql +0 -0
  8. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/queries/dependencies.sql +0 -0
  9. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/queries/impact.sql +0 -0
  10. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/queries/invalid-objects.sql +0 -0
  11. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/queries/name-occupants.sql +0 -0
  12. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/queries/object-source.sql +0 -0
  13. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/queries/plscope-enabled.sql +0 -0
  14. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/queries/plscope-statements.sql +0 -0
  15. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/queries/plscope-usages.sql +0 -0
  16. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/queries/session-privileges.sql +0 -0
  17. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/queries/similar-candidates.sql +0 -0
  18. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/queries/source.sql +0 -0
  19. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/scripts/pythia_plsql.egg-info/SOURCES.txt +0 -0
  20. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/scripts/pythia_plsql.egg-info/dependency_links.txt +0 -0
  21. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/scripts/pythia_plsql.egg-info/entry_points.txt +0 -0
  22. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/scripts/pythia_plsql.egg-info/requires.txt +0 -0
  23. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/scripts/pythia_plsql.egg-info/top_level.txt +0 -0
  24. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/setup.cfg +0 -0
  25. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/skills/pythia-apply/SKILL.md +0 -0
  26. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/skills/pythia-explore/SKILL.md +0 -0
  27. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/skills/pythia-explore/reference/data-dictionary.md +0 -0
  28. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/skills/pythia-impact/SKILL.md +0 -0
  29. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/skills/pythia-review/SKILL.md +0 -0
  30. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/skills/pythia-review/reference/antipatterns.md +0 -0
  31. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/skills/pythia-setup/SKILL.md +0 -0
  32. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/skills/pythia-skill-author/SKILL.md +0 -0
  33. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/skills/pythia-write/SKILL.md +0 -0
  34. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/skills/pythia-write/reference/patterns.md +0 -0
  35. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/tests/test_install.py +0 -0
  36. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/tests/test_phase1.py +0 -0
  37. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/tests/test_phase2.py +0 -0
  38. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/tests/test_phase3.py +0 -0
  39. {pythia_plsql-0.3.0 → pythia_plsql-0.3.1}/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.0
3
+ Version: 0.3.1
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.0"
7
+ version = "0.3.1"
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" }
@@ -201,6 +201,13 @@ def invocation():
201
201
  return pathlib.Path(prog).name
202
202
 
203
203
 
204
+ HEADLESS_YES_MSG = (
205
+ "--yes is the developer's flag, and no terminal is attached to this "
206
+ "session.\nAgents preview, relay the diff and the impact verbatim, "
207
+ "STOP, and pass --confirm <token> only after the developer's explicit "
208
+ "approval in chat.\n(Real pipelines set PYTHIA_CI=1.)")
209
+
210
+
204
211
  def human_at_the_keyboard():
205
212
  """True only when a person is typing: stdin is a TTY. An agent driving
206
213
  the CLI through a subprocess has no TTY and cannot fake one — which is
@@ -1124,11 +1131,7 @@ def run_apply(conn, schema, ns, file_text, origin=None):
1124
1131
  db_source = "".join(cell(r[0]) for r in rows)
1125
1132
  token = apply_token(otype, name, file_text, db_source)
1126
1133
  if ns.yes and not human_at_the_keyboard():
1127
- sys.exit("--yes is the developer's flag, and no terminal is attached "
1128
- "to this session.\nAgents preview, relay the diff and the "
1129
- "impact verbatim, STOP, and pass --confirm <token> only "
1130
- "after the developer's explicit approval in chat.\n"
1131
- "(Real pipelines set PYTHIA_CI=1.)")
1134
+ sys.exit(HEADLESS_YES_MSG)
1132
1135
  confirmed = bool(ns.yes) or ns.confirm == token
1133
1136
  if ns.confirm and ns.confirm != token:
1134
1137
  sys.exit("The confirmation token does not match: the file or the "
@@ -1842,6 +1845,15 @@ def main(argv=None):
1842
1845
  except AttributeError:
1843
1846
  pass
1844
1847
  ns = build_parser().parse_args(argv)
1848
+ # refusals that need no database come first — an unreachable or locked
1849
+ # connection must never mask them
1850
+ if ns.command == "sql" and not is_readonly_sql(
1851
+ " ".join(ns.statement).strip().rstrip(";")):
1852
+ sys.exit("Only SELECT/WITH statements are allowed; sql is read-only."
1853
+ f"\nThe write path is `{invocation()} apply <file>` — "
1854
+ "snapshot, preview and verify included.")
1855
+ if getattr(ns, "yes", False) and not human_at_the_keyboard():
1856
+ sys.exit(HEADLESS_YES_MSG)
1845
1857
  ns.color = color_enabled() and not ns.json
1846
1858
  if ns.color and os.name == "nt":
1847
1859
  # Constant empty string, never user input — safe from injection. This
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pythia-plsql
3
- Version: 0.3.0
3
+ Version: 0.3.1
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
File without changes
File without changes
File without changes