kingdom-cli 0.1.4__tar.gz → 0.2__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 (74) hide show
  1. {kingdom_cli-0.1.4/src/kingdom_cli.egg-info → kingdom_cli-0.2}/PKG-INFO +1 -1
  2. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/pyproject.toml +4 -1
  3. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/agent.py +11 -5
  4. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/breakdown.py +0 -2
  5. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/cli.py +512 -152
  6. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/config.py +12 -0
  7. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/council/base.py +12 -3
  8. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/council/council.py +10 -24
  9. kingdom_cli-0.2/src/kingdom/harness.py +727 -0
  10. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/parsing.py +0 -22
  11. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/session.py +52 -68
  12. kingdom_cli-0.2/src/kingdom/skill/SKILL.md +160 -0
  13. kingdom_cli-0.2/src/kingdom/skill/__init__.py +0 -0
  14. kingdom_cli-0.2/src/kingdom/skill/references/__init__.py +0 -0
  15. kingdom_cli-0.2/src/kingdom/skill/references/council.md +69 -0
  16. kingdom_cli-0.2/src/kingdom/skill/references/peasants.md +53 -0
  17. kingdom_cli-0.2/src/kingdom/skill/references/tickets.md +72 -0
  18. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/state.py +0 -11
  19. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/synthesis.py +0 -11
  20. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/thread.py +0 -2
  21. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/ticket.py +21 -181
  22. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/tui/app.py +128 -88
  23. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/tui/widgets.py +44 -3
  24. {kingdom_cli-0.1.4 → kingdom_cli-0.2/src/kingdom_cli.egg-info}/PKG-INFO +1 -1
  25. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom_cli.egg-info/SOURCES.txt +6 -0
  26. kingdom_cli-0.2/tests/test_cli.py +418 -0
  27. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_cli_council.py +8 -8
  28. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_cli_peasant.py +548 -92
  29. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_cli_status.py +27 -2
  30. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_cli_ticket.py +450 -6
  31. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_cli_ticket_current.py +39 -0
  32. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_council.py +30 -0
  33. kingdom_cli-0.2/tests/test_harness.py +1369 -0
  34. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_init.py +128 -0
  35. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_session.py +81 -8
  36. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_ticket.py +13 -13
  37. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_tui.py +319 -42
  38. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_tui_widgets.py +101 -2
  39. kingdom_cli-0.1.4/src/kingdom/harness.py +0 -473
  40. kingdom_cli-0.1.4/tests/test_cli.py +0 -206
  41. kingdom_cli-0.1.4/tests/test_harness.py +0 -829
  42. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/LICENSE +0 -0
  43. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/README.md +0 -0
  44. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/setup.cfg +0 -0
  45. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/__init__.py +0 -0
  46. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/__main__.py +0 -0
  47. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/council/__init__.py +0 -0
  48. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/council/bundle.py +0 -0
  49. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/council/worker.py +0 -0
  50. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/design.py +0 -0
  51. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/tui/__init__.py +0 -0
  52. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/tui/clipboard.py +0 -0
  53. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom/tui/poll.py +0 -0
  54. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom_cli.egg-info/dependency_links.txt +0 -0
  55. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom_cli.egg-info/entry_points.txt +0 -0
  56. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom_cli.egg-info/requires.txt +0 -0
  57. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/src/kingdom_cli.egg-info/top_level.txt +0 -0
  58. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_agent.py +0 -0
  59. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_breakdown.py +0 -0
  60. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_cli_design_breakdown.py +0 -0
  61. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_cli_whoami.py +0 -0
  62. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_config.py +0 -0
  63. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_design.py +0 -0
  64. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_done.py +0 -0
  65. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_parsing.py +0 -0
  66. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_skill.py +0 -0
  67. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_state.py +0 -0
  68. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_synthesis.py +0 -0
  69. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_thread.py +0 -0
  70. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_tui_clipboard.py +0 -0
  71. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_tui_integration.py +0 -0
  72. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_tui_poll.py +0 -0
  73. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_tui_reply.py +0 -0
  74. {kingdom_cli-0.1.4 → kingdom_cli-0.2}/tests/test_tui_thinking_persistence.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kingdom-cli
3
- Version: 0.1.4
3
+ Version: 0.2
4
4
  Summary: A markdown file-based CLI for software development with multi-agent council design, markdown tickets, and background worker loops.
5
5
  Author: James Robinson-Bohnslav
6
6
  License-Expression: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "kingdom-cli"
3
- version = "0.1.4"
3
+ version = "0.2"
4
4
  description = "A markdown file-based CLI for software development with multi-agent council design, markdown tickets, and background worker loops."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -40,6 +40,9 @@ build-backend = "setuptools.build_meta"
40
40
  [tool.setuptools.packages.find]
41
41
  where = ["src"]
42
42
 
43
+ [tool.setuptools.package-data]
44
+ "kingdom.skill" = ["*.md", "references/*.md"]
45
+
43
46
  [dependency-groups]
44
47
  dev = [
45
48
  "pre-commit>=4.0.0",
@@ -11,8 +11,8 @@ from __future__ import annotations
11
11
  import json
12
12
  import logging
13
13
  import shlex
14
+ from collections.abc import Callable
14
15
  from dataclasses import dataclass, field
15
- from typing import Any
16
16
 
17
17
  from kingdom.config import AgentDef
18
18
 
@@ -301,7 +301,9 @@ def parse_cursor_response(stdout: str, stderr: str, code: int) -> tuple[str, str
301
301
  return "", session_id, raw
302
302
 
303
303
 
304
- RESPONSE_PARSERS: dict[str, Any] = {
304
+ ResponseParser = Callable[[str, str, int], tuple[str, str | None, str]]
305
+
306
+ RESPONSE_PARSERS: dict[str, ResponseParser] = {
305
307
  "claude_code": parse_claude_response,
306
308
  "codex": parse_codex_response,
307
309
  "cursor": parse_cursor_response,
@@ -424,7 +426,9 @@ def build_cursor_command(
424
426
  return cmd
425
427
 
426
428
 
427
- COMMAND_BUILDERS: dict[str, Any] = {
429
+ CommandBuilder = Callable[[AgentConfig, str, str | None, bool, bool], list[str]]
430
+
431
+ COMMAND_BUILDERS: dict[str, CommandBuilder] = {
428
432
  "claude_code": build_claude_command,
429
433
  "codex": build_codex_command,
430
434
  "cursor": build_cursor_command,
@@ -561,7 +565,9 @@ def extract_cursor_stream_text(line: str) -> str | None:
561
565
  return None
562
566
 
563
567
 
564
- STREAM_TEXT_EXTRACTORS: dict[str, Any] = {
568
+ StreamExtractor = Callable[[str], str | None]
569
+
570
+ STREAM_TEXT_EXTRACTORS: dict[str, StreamExtractor] = {
565
571
  "claude_code": extract_claude_stream_text,
566
572
  "codex": extract_codex_stream_text,
567
573
  "cursor": extract_cursor_stream_text,
@@ -624,7 +630,7 @@ def extract_codex_stream_thinking(line: str) -> str | None:
624
630
  return None
625
631
 
626
632
 
627
- STREAM_THINKING_EXTRACTORS: dict[str, Any] = {
633
+ STREAM_THINKING_EXTRACTORS: dict[str, StreamExtractor] = {
628
634
  "codex": extract_codex_stream_thinking,
629
635
  "cursor": extract_cursor_stream_thinking,
630
636
  }
@@ -7,7 +7,6 @@ from pathlib import Path
7
7
 
8
8
 
9
9
  def build_breakdown_template(feature: str) -> str:
10
- """Return a minimal `breakdown.md` template for a feature."""
11
10
  return (
12
11
  f"# Breakdown: {feature}\n\n"
13
12
  "## Design Summary\n"
@@ -27,7 +26,6 @@ def build_breakdown_template(feature: str) -> str:
27
26
 
28
27
 
29
28
  def read_breakdown(breakdown_path: Path) -> str:
30
- """Read the breakdown file text (empty string if missing)."""
31
29
  if not breakdown_path.exists():
32
30
  return ""
33
31
  return breakdown_path.read_text(encoding="utf-8")