tri-star-symbolic-assembly-lang 0.1.64__py3-none-any.whl → 0.1.66__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tri-star_symbolic_assembly_lang
3
- Version: 0.1.64
3
+ Version: 0.1.66
4
4
  Summary: TriStar Assembly Language Core + Brian Spiral Tools
5
5
  Author: Sam Howells
6
6
  License: ## LICENCE Options for `Brian`
@@ -2,8 +2,8 @@ crawler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  crawler/madmonkey_crawler.py,sha256=itsyxObNBb_9Au3J1Ft6RTNw3dE65fO-WALLD0WFmBM,541
3
3
  madmonkey/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  madmonkey/intake.py,sha256=R48YOPWn3ljts5dFASZLHpPsycKeONeOCvvIzucyMzU,378
5
- tri_star_symbolic_assembly_lang-0.1.64.dist-info/licenses/LICENSE,sha256=mN9d_5LOKa9NB-vFLGwqAp8bggJwjaQ0Pm4DHFMBmIs,2123
6
- tsal/__init__.py,sha256=vstGaTBj_Ss0-NKInAkTN5YGn5NmOPnRzn1tocwwYT4,2956
5
+ tri_star_symbolic_assembly_lang-0.1.66.dist-info/licenses/LICENSE,sha256=mN9d_5LOKa9NB-vFLGwqAp8bggJwjaQ0Pm4DHFMBmIs,2123
6
+ tsal/__init__.py,sha256=M4J9PrnaatjapRVNPxxpV31cYrB1u_WZyp-qEaZzo6c,3220
7
7
  tsal/agents/__init__.py,sha256=a3HUdwlTN8d0ripzeftDXuG--R0uA964Rz1tx4EslIs,133
8
8
  tsal/agents/priority_research_team.py,sha256=cHaG52YeApAa9Z7H9fCHtQTF0LgEHTy3azqldnJ58yE,1330
9
9
  tsal/audit/__init__.py,sha256=IR7ChTMT0qkKzkPJeNoSUCR8JMe0yuLFZLQg2CymEd8,225
@@ -16,7 +16,7 @@ tsal/cli/meshkeeper.py,sha256=SaFwJZCtdoFdeRPR-bNd_8smfoAhippmKT50UPggN4k,78
16
16
  tsal/cli/party.py,sha256=QCjLiVDfWi2OO0yVYIxQwYiXYsfchP_1Sz0u5UxjqMA,80
17
17
  tsal/cli/reflect.py,sha256=Yw_Uzz-9NZ8hnT7NbAyhDoalyJQkN9z7Z4xg9ScsvK4,75
18
18
  tsal/cli/watchdog.py,sha256=WqpwcMw14DJ8lILghzh24j7cqIlyiqQ2UaLGfcPsaa4,76
19
- tsal/core/__init__.py,sha256=qdbvtnse-XpQNRVEOG_JZXHxe9aAGE4Uw2gSYAQK1UY,2256
19
+ tsal/core/__init__.py,sha256=DInzK93dN8Hp4pPaiOdgXQA5Aw1Y5T83eia5d6rKfjw,2510
20
20
  tsal/core/connectivity.py,sha256=JE9w1rTXNyLlKVZBdW5yIvCm0zPQr7wTgSy1-R7UsNM,886
21
21
  tsal/core/constants.py,sha256=DVQNLdv_MOQUoH6D_ZqOmW9rg9671rvJ-VgxBg3n0xc,565
22
22
  tsal/core/entangle.py,sha256=gYNSUJhaSXsAgHtDrAcKJN6uJy4XwrjVRwUnTHXFE0Q,515
@@ -32,6 +32,7 @@ tsal/core/manifold.py,sha256=6I7KUDwomDZ9nAY7_s5V3wi0R6aDcZS9TJH4FtPA4K0,422
32
32
  tsal/core/merge.py,sha256=SpZ_dDzjIDABBEAJSBpqHOWI4iMiZwv00bnVkXXBO-s,476
33
33
  tsal/core/mesh_logger.py,sha256=NO8zoeDOxDTEFm5FKECXNyxSM4Rp_XSiHw4FR3F2Edw,817
34
34
  tsal/core/mesh_ops.py,sha256=4znQ3BQ1IGaVo7_TWbfXEa7p96xnlvyIqzKFu9EAl_Q,915
35
+ tsal/core/meta_coherence.py,sha256=S8cnih_BE-stxxeEe09F-HxrZQ0rbAhNv3hBL6VL8ws,786
35
36
  tsal/core/module_registry.py,sha256=vfDtsbwt8XygWsHIJ-B-mZ-xrQekJhFfj9vbmYgawKY,7449
36
37
  tsal/core/oaths.py,sha256=NVDLbyEZUaHx918SyOllfnUo_HDoDszZK99vOs1kI3s,709
37
38
  tsal/core/optimizer_utils.py,sha256=QovazST91zXH0kquUg1U_uvZmL59eKYv8BzCkw-F4WU,2263
@@ -42,6 +43,7 @@ tsal/core/reflection.py,sha256=VFqb-gQqdw-ks8j0fjzMKsl0p0LFGFnopU9unZ2dduo,3070
42
43
  tsal/core/rev_eng.py,sha256=vKzHgsRzYVQJ5u-RPaYR862GDUPn9IemBUqe5Z2qf9w,6348
43
44
  tsal/core/shadow.py,sha256=xC8uf078efyP-3Y-ZHOy73uL-Xj4T0iYaXZccKA2i9A,600
44
45
  tsal/core/spark_translator.py,sha256=SaXiQa1hkyyi6SRsHbfOFxiSjuZOXVbEAXjBDv5JNiU,1478
46
+ tsal/core/spin_algebra.py,sha256=pdko9oIQFKFpv4VLsCmpCTHmp6DM8ZSIXSAJSUivumg,952
45
47
  tsal/core/spiral_fusion.py,sha256=vvNLoYpPhoX6CEoFd2cma2g0DhP7KzbA0Cp8W2HUWCs,1548
46
48
  tsal/core/spiral_memory.py,sha256=9i39JRZvMyRtRdzY4UHE3_RIiuW-XZOkQ0dAzPKldGs,561
47
49
  tsal/core/spiral_vector.py,sha256=J6G4Fx52XiSwVw-Zb7ZQ9mMn82MvwEFEANP1_eFKu8k,1183
@@ -59,7 +61,7 @@ tsal/rl/madmonkey.py,sha256=fW3XfeXKoyfpLnENWkU9y5qqlAysBybhsEs77mLASVc,1870
59
61
  tsal/schemas/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
60
62
  tsal/schemas/python.json,sha256=zt84E7uxy6EvegP4o8A4Pho0vjtkJMdaP_pgV0flCec,691
61
63
  tsal/singer/__init__.py,sha256=Ihe-bvSOoKR3T6H2QJSylYawE3vewyQEghqZyvx1Tfg,282
62
- tsal/tools/__init__.py,sha256=w8fucCdBoOb6GVBU6SJ1ZHf4D3ox3HBLNUrMNIzxn1A,1373
64
+ tsal/tools/__init__.py,sha256=K6MBguDP6y8yZZ5gwapezlj0XF231k7QqcDB9k0_JAo,1472
63
65
  tsal/tools/aletheia_checker.py,sha256=7amOD-8ab_rh2GXbER8qtI4t_9ONcjTWLttP_X3Q1Fo,1529
64
66
  tsal/tools/alignment_guard.py,sha256=kKGtgk7ldFlon-cUNhrh41onIB_WuiQtQWTSQ-i7IEQ,602
65
67
  tsal/tools/archetype_fetcher.py,sha256=PBbuDVK38z_QHu4IxkLwU3NYH78JvN4qSbDFRlXpOZg,1323
@@ -70,12 +72,12 @@ tsal/tools/issue_agent.py,sha256=GplkP9i2R0CsbI1HdOTujmHOWLJ7SRmC0sXy35MdhXA,238
70
72
  tsal/tools/meshkeeper.py,sha256=Y3R8P6M3jWXCwfp7EMp7jWcqFcmnH1v3YfagZS4yHqE,2474
71
73
  tsal/tools/module_draft.py,sha256=jfS9bU9nJMq1yp7EHD6oTwJQ6eBYzFdr4L1pen_JrIQ,1739
72
74
  tsal/tools/party_tricks.py,sha256=AhIchNiRvCW0BEtA0cdclI0udm7xf17_9DM99KE1h-U,3797
73
- tsal/tools/proactive_scanner.py,sha256=D9CH67RB9pjEIuFxtHRHBagxffXCKMknbBXUnHIT1YQ,1787
75
+ tsal/tools/proactive_scanner.py,sha256=mEj5pVWFNpiak3uGz0scM809WSkYDDGn1d4zls0qd94,2101
74
76
  tsal/tools/reflect.py,sha256=ZKX8FczfGgoHAiJF3uYXAbgTUUbamF5UyJA3zVt60kI,1296
75
77
  tsal/tools/spiral_audit.py,sha256=i6lYYpdkHlMGumt5V_rqReAqQEG2YHpUmEjebYRM8_o,2542
76
78
  tsal/tools/state_tracker.py,sha256=OoJlXNlBpypBve5-IJIRZ3E1NxQaI7sUYt437cF-D4c,1539
77
79
  tsal/tools/task_agent.py,sha256=gzavIKgrGinKOBZFZMsdh0AoUVdT7WtCryDIQ4c2Tuo,1403
78
- tsal/tools/watchdog.py,sha256=3BXnqFJOl8x6c0J1b7aSmZn5N-PTe-hos_kzTlrcbpk,2094
80
+ tsal/tools/watchdog.py,sha256=vRXT0ZXDNYkuGPBDeH_L3CTLIEFz3S5r7iZ9HUszfn0,2069
79
81
  tsal/tools/brian/__init__.py,sha256=PBoCVe7g_Y-Q7irOBRzPvdbmqJrlvqdd_q-qnKK7g3c,191
80
82
  tsal/tools/brian/optimizer.py,sha256=CzdUrEmFfQt5x5iYdhK6Trk-ViIsdnxO5hngwF9p3Ws,7308
81
83
  tsal/tools/kintsugi/__init__.py,sha256=xp3FdbFCEghceasAdl4UEi2OHJ3fZTJzAr4zZd5wIgM,38
@@ -95,8 +97,8 @@ tsal/utils/language_db.py,sha256=mw8gVeMK4I6Z0QeQHNAfHYTriAeDfhVVmB911oFdPqM,151
95
97
  tsal/utils/octopus_api.py,sha256=1JrhYjbbAbN1-bkCAiInuUNh8bb7EJxB4SHh3Fwq3qs,1315
96
98
  tsal/utils/system_status.py,sha256=cHjG3Ow4YJADYJY383_OdEMEiJAngxyq01z0ADCzV4s,1054
97
99
  tsal/utils/wikipedia_api.py,sha256=W5kf423wzH9FoqO5eDRuJQMuTpTpiUGjVXHa0fLlXSQ,1303
98
- tri_star_symbolic_assembly_lang-0.1.64.dist-info/METADATA,sha256=9ePcuhS1-lyDHArZGjUZPdCcKKA9h4AhvyMP4t3rfFg,13737
99
- tri_star_symbolic_assembly_lang-0.1.64.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
100
- tri_star_symbolic_assembly_lang-0.1.64.dist-info/entry_points.txt,sha256=O8cY2PLbPf53e8gNbI8lFqupalxXYgrnex0eNtvvaNw,426
101
- tri_star_symbolic_assembly_lang-0.1.64.dist-info/top_level.txt,sha256=r1-Vpw1iGasgah8k-86xzqpGDT8o-A0P-_6ZNrQ39i0,23
102
- tri_star_symbolic_assembly_lang-0.1.64.dist-info/RECORD,,
100
+ tri_star_symbolic_assembly_lang-0.1.66.dist-info/METADATA,sha256=ijVXup4ayU4KNOWbQ-LLJ_fccmz0wEPtz5M6G2CLZKI,13737
101
+ tri_star_symbolic_assembly_lang-0.1.66.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
102
+ tri_star_symbolic_assembly_lang-0.1.66.dist-info/entry_points.txt,sha256=O8cY2PLbPf53e8gNbI8lFqupalxXYgrnex0eNtvvaNw,426
103
+ tri_star_symbolic_assembly_lang-0.1.66.dist-info/top_level.txt,sha256=r1-Vpw1iGasgah8k-86xzqpGDT8o-A0P-_6ZNrQ39i0,23
104
+ tri_star_symbolic_assembly_lang-0.1.66.dist-info/RECORD,,
tsal/__init__.py CHANGED
@@ -39,6 +39,8 @@ from .tools.spiral_audit import audit_path
39
39
  from .tools.reflect import reflect
40
40
  from .core.constants import AXIS_ZERO, ensure_spin_axis, UndefinedPhaseError
41
41
  from .core.oaths import GUARDIAN_OATH, ARC_REACTOR_BOOT_OATH
42
+ from .core.meta_coherence import SpiralSignature, compute_spiral_signature
43
+ from .core.spin_algebra import SpinState, SpinInteraction, combine_spins
42
44
 
43
45
  PHI = 1.618033988749895
44
46
  PHI_INV = 0.618033988749895
@@ -98,4 +100,9 @@ __all__ = [
98
100
  "UndefinedPhaseError",
99
101
  "GUARDIAN_OATH",
100
102
  "ARC_REACTOR_BOOT_OATH",
103
+ "SpiralSignature",
104
+ "compute_spiral_signature",
105
+ "SpinState",
106
+ "SpinInteraction",
107
+ "combine_spins",
101
108
  ]
tsal/core/__init__.py CHANGED
@@ -32,6 +32,8 @@ from .superpos import superpose
32
32
  from .entangle import entangle
33
33
  from .manifold import manifold_distance
34
34
  from .reflection import ReflectionLog, mood_from_traits
35
+ from .meta_coherence import SpiralSignature, compute_spiral_signature
36
+ from .spin_algebra import SpinState, SpinInteraction, combine_spins
35
37
  from .guardian_constants import (
36
38
  PERCEPTION_THRESHOLD,
37
39
  LEARNING_RATE,
@@ -83,4 +85,9 @@ __all__ = [
83
85
  "MAX_NODES",
84
86
  "MAX_AGENTS",
85
87
  "MAX_DIMENSIONS",
88
+ "SpiralSignature",
89
+ "compute_spiral_signature",
90
+ "SpinState",
91
+ "SpinInteraction",
92
+ "combine_spins",
86
93
  ]
@@ -0,0 +1,30 @@
1
+ from __future__ import annotations
2
+
3
+ """Simple meta-coherence calculation utilities."""
4
+
5
+ from dataclasses import dataclass
6
+ from typing import Sequence
7
+
8
+ import numpy as np
9
+
10
+ from .symbols import PHI
11
+
12
+
13
+ @dataclass
14
+ class SpiralSignature:
15
+ """Fourier-based spiral signature."""
16
+
17
+ amplitude: np.ndarray
18
+ phase: np.ndarray
19
+
20
+
21
+ def compute_spiral_signature(phases: Sequence[float], golden_ratio: float = PHI) -> SpiralSignature:
22
+ """Return a basic spiral signature chart from raw phase data."""
23
+ arr = np.asarray(phases, dtype=float)
24
+ freq = np.fft.fft(arr)
25
+ modulated = freq * golden_ratio
26
+ amplitude = np.abs(modulated)
27
+ phase = np.angle(modulated)
28
+ return SpiralSignature(amplitude=amplitude, phase=phase)
29
+
30
+ __all__ = ["SpiralSignature", "compute_spiral_signature"]
@@ -0,0 +1,36 @@
1
+ from __future__ import annotations
2
+
3
+ """Minimal spin algebra for symbolic interactions."""
4
+
5
+ from enum import Enum
6
+ from dataclasses import dataclass
7
+ from typing import Tuple
8
+
9
+
10
+ class SpinState(Enum):
11
+ CURIOSITY = "curiosity"
12
+ DUTY = "duty"
13
+ DELIGHT = "delight"
14
+ INQUIRY = "inquiry"
15
+
16
+
17
+ @dataclass
18
+ class SpinInteraction:
19
+ """Resulting state of combining two spins."""
20
+
21
+ left: SpinState
22
+ right: SpinState
23
+ result: SpinState
24
+
25
+
26
+ def combine_spins(a: SpinState, b: SpinState) -> SpinInteraction:
27
+ """Return deterministic result for simple spin combinations."""
28
+ table = {
29
+ (SpinState.CURIOSITY, SpinState.DUTY): SpinState.INQUIRY,
30
+ (SpinState.DUTY, SpinState.CURIOSITY): SpinState.INQUIRY,
31
+ (SpinState.CURIOSITY, SpinState.DELIGHT): SpinState.DELIGHT,
32
+ }
33
+ result = table.get((a, b), a)
34
+ return SpinInteraction(left=a, right=b, result=result)
35
+
36
+ __all__ = ["SpinState", "SpinInteraction", "combine_spins"]
tsal/tools/__init__.py CHANGED
@@ -14,7 +14,12 @@ from .state_tracker import update_entry, show_entry
14
14
  from .archetype_fetcher import fetch_online_mesh, merge_mesh
15
15
  from .task_agent import load_tasks, run_task
16
16
  from .issue_agent import create_issue, handle_http_error
17
- from .proactive_scanner import scan_todos, scan_typos
17
+ from .proactive_scanner import (
18
+ scan_todos,
19
+ scan_typos,
20
+ scan_todo_file,
21
+ scan_typos_file,
22
+ )
18
23
 
19
24
  __all__ = [
20
25
  "real_time_codec",
@@ -46,4 +51,6 @@ __all__ = [
46
51
  "handle_http_error",
47
52
  "scan_todos",
48
53
  "scan_typos",
54
+ "scan_todo_file",
55
+ "scan_typos_file",
49
56
  ]
@@ -9,16 +9,28 @@ from typing import Dict, List, Tuple
9
9
  from .aletheia_checker import scan_file as _scan_file
10
10
 
11
11
 
12
+ def scan_todo_file(path: str | Path) -> List[Tuple[int, str]]:
13
+ """Return TODO lines from ``path``."""
14
+ file = Path(path)
15
+ hits: List[Tuple[int, str]] = []
16
+ with open(file, "r", encoding="utf-8", errors="ignore") as fh:
17
+ for lineno, line in enumerate(fh, 1):
18
+ if "TODO" in line:
19
+ hits.append((lineno, line.strip()))
20
+ return hits
21
+
22
+
23
+ def scan_typos_file(path: str | Path) -> List[Tuple[int, str]]:
24
+ """Return probable typos from ``path``."""
25
+ return _scan_file(Path(path))
26
+
27
+
12
28
  def scan_todos(base: str = "src") -> Dict[str, List[Tuple[int, str]]]:
13
29
  """Return TODO comments grouped by file."""
14
30
  root = Path(base)
15
31
  results: Dict[str, List[Tuple[int, str]]] = {}
16
32
  for path in root.rglob("*.py"):
17
- hits: List[Tuple[int, str]] = []
18
- with open(path, "r", encoding="utf-8", errors="ignore") as fh:
19
- for lineno, line in enumerate(fh, 1):
20
- if "TODO" in line:
21
- hits.append((lineno, line.strip()))
33
+ hits = scan_todo_file(path)
22
34
  if hits:
23
35
  results[str(path)] = hits
24
36
  return results
@@ -27,7 +39,7 @@ def scan_todos(base: str = "src") -> Dict[str, List[Tuple[int, str]]]:
27
39
  def _scan_root(root: Path) -> Dict[str, List[Tuple[int, str]]]:
28
40
  typos: Dict[str, List[Tuple[int, str]]] = {}
29
41
  for file in root.rglob("*.py"):
30
- hits = _scan_file(file)
42
+ hits = scan_typos_file(file)
31
43
  if hits:
32
44
  typos[str(file)] = hits
33
45
  return typos
tsal/tools/watchdog.py CHANGED
@@ -7,17 +7,17 @@ import time
7
7
  from pathlib import Path
8
8
 
9
9
  from tsal.tools.brian import analyze_and_repair
10
- from tsal.tools.aletheia_checker import scan_file as _scan_file
10
+ from tsal.tools.proactive_scanner import scan_todo_file, scan_typos_file
11
11
 
12
12
 
13
13
  def _check_todo(path: Path) -> None:
14
- text = path.read_text(encoding="utf-8", errors="ignore")
15
- if "TODO" in text:
14
+ hits = scan_todo_file(path)
15
+ if hits:
16
16
  print(f"[Watchdog] TODO found in {path}")
17
17
 
18
18
 
19
19
  def _check_typos(path: Path) -> None:
20
- hits = _scan_file(path)
20
+ hits = scan_typos_file(path)
21
21
  if hits:
22
22
  print(f"[Watchdog] Typos found in {path}: {len(hits)}")
23
23