logseq-matryca-parser 1.1.1__tar.gz → 1.2.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 (97) hide show
  1. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/.cursorignore +3 -0
  2. logseq_matryca_parser-1.2.1/.github/CODEOWNERS +4 -0
  3. logseq_matryca_parser-1.2.1/.github/ISSUE_TEMPLATE/config.yml +11 -0
  4. logseq_matryca_parser-1.2.1/.github/workflows/ci.yml +49 -0
  5. logseq_matryca_parser-1.2.1/.github/workflows/codeql.yml +37 -0
  6. logseq_matryca_parser-1.2.1/.github/workflows/daily-metrics.yml +145 -0
  7. logseq_matryca_parser-1.2.1/.github/workflows/github_release.yml +53 -0
  8. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/.github/workflows/pypi_publish.yml +25 -0
  9. logseq_matryca_parser-1.2.1/.pre-commit-config.yaml +19 -0
  10. logseq_matryca_parser-1.2.1/CHANGELOG.md +90 -0
  11. logseq_matryca_parser-1.2.1/CODE_OF_CONDUCT.md +132 -0
  12. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/CONTRIBUTING.md +26 -26
  13. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/Makefile +2 -2
  14. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/PKG-INFO +88 -30
  15. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/README.md +82 -29
  16. logseq_matryca_parser-1.2.1/SECURITY.md +50 -0
  17. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/ARCHITECTURE.md +45 -8
  18. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/RELEASE_PROCESS.md +23 -6
  19. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/design-docs/LOGSEQ_ASSET_RESOLUTION_SPEC.md +2 -0
  20. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/logseq_ast_primer.md +74 -9
  21. logseq_matryca_parser-1.2.1/metrics/history.json +2506 -0
  22. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/pyproject.toml +20 -1
  23. logseq_matryca_parser-1.2.1/scripts/debug_pre_release.py +170 -0
  24. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/__init__.py +1 -1
  25. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/agent_writer.py +1 -1
  26. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/graph.py +58 -6
  27. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/logos_core.py +3 -1
  28. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/logos_parser.py +132 -21
  29. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/logseq_markdown.py +114 -9
  30. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/logseq_paths.py +2 -1
  31. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/tests/test_graph.py +15 -0
  32. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/tests/test_logos_parser.py +221 -0
  33. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/tests/test_logseq_paths.py +12 -0
  34. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/tests/test_package_version.py +6 -0
  35. logseq_matryca_parser-1.2.1/tests/test_pre_release_roundtrip.py +79 -0
  36. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/uv.lock +458 -1
  37. logseq_matryca_parser-1.1.1/.github/workflows/ci.yml +0 -42
  38. logseq_matryca_parser-1.1.1/.pre-commit-config.yaml +0 -10
  39. logseq_matryca_parser-1.1.1/CHANGELOG.md +0 -40
  40. logseq_matryca_parser-1.1.1/SECURITY.md +0 -8
  41. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/.github/FUNDING.yml +0 -0
  42. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  43. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  44. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  45. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/.github/dependabot.yml +0 -0
  46. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/.gitignore +0 -0
  47. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/.repomixignore +0 -0
  48. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/LICENSE +0 -0
  49. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/NOTICE +0 -0
  50. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/claude-skill-logseq-read/SKILL.md +0 -0
  51. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/claude-skill-logseq-read/scripts/parse_logseq.py +0 -0
  52. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/design-docs/ARCHITECTURE_BLUEPRINT.md +0 -0
  53. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/design-docs/CODE_SCAFFOLD.md +0 -0
  54. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/design-docs/LOGSEQ_DATASCRIPT_MAPPING.md +0 -0
  55. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/design-docs/LOGSEQ_TEMPORAL_ONTOLOGY.md +0 -0
  56. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/design-docs/OFFICIAL_MLDOC_SPECS.md +0 -0
  57. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/design-docs/REFERENCE_SPEC.md +0 -0
  58. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/error_log.md +0 -0
  59. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1/docs/roadmaps}/ROADMAP_AGENT_NATIVE_XRAY.md +0 -0
  60. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/roadmaps/ROADMAP_CLI_HYDRATION_AND_ENRICHMENT.md +0 -0
  61. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/roadmaps/ROADMAP_CONTEXT_SYNTHESIS_AND_SCOPING.md +0 -0
  62. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/roadmaps/ROADMAP_EMBED_EXPANSION_AND_FLUENT_QUERIES.md +0 -0
  63. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/roadmaps/ROADMAP_GRAPH_RAG_SEMANTICS.md +0 -0
  64. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1/docs/roadmaps}/ROADMAP_HEADLESS_WRITER.md +0 -0
  65. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/roadmaps/ROADMAP_INCREMENTAL_WATCHER.md +0 -0
  66. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/roadmaps/ROADMAP_INLINE_SHIELD_AND_NAMESPACES.md +0 -0
  67. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1/docs/roadmaps}/ROADMAP_OBSIDIAN_ADAPTER.md +0 -0
  68. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/roadmaps/ROADMAP_ROBUSTNESS_AND_SOFT_BREAKS.md +0 -0
  69. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/roadmaps/ROADMAP_TOML_FIX_AND_PYPI_DISTRIBUTION.md +0 -0
  70. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/docs/roadmaps/ROADMAP_UUID_AND_GRAPH_SUPERPOWERS.md +0 -0
  71. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/examples/demo_logseq_journal.md +0 -0
  72. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/examples/run_demo.py +0 -0
  73. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/legacy/local_digestor.py +0 -0
  74. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/lib/bindings/utils.js +0 -0
  75. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/lib/tom-select/tom-select.complete.min.js +0 -0
  76. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/lib/tom-select/tom-select.css +0 -0
  77. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/lib/vis-9.1.2/vis-network.css +0 -0
  78. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/lib/vis-9.1.2/vis-network.min.js +0 -0
  79. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/repomix-output-parser.xml +0 -0
  80. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/scripts/extract_changelog.py +0 -0
  81. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/.gitignore +0 -0
  82. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/NOTICE +0 -0
  83. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/__main__.py +0 -0
  84. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/agent_press.py +0 -0
  85. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/exceptions.py +0 -0
  86. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/forge.py +0 -0
  87. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/kinetic.py +0 -0
  88. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/lens.py +0 -0
  89. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/pyproject.toml +0 -0
  90. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/src/logseq_matryca_parser/synapse.py +0 -0
  91. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/tests/test_agent_press.py +0 -0
  92. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/tests/test_agent_writer.py +0 -0
  93. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/tests/test_forge.py +0 -0
  94. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/tests/test_kinetic.py +0 -0
  95. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/tests/test_lens.py +0 -0
  96. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/tests/test_logseq_markdown.py +0 -0
  97. {logseq_matryca_parser-1.1.1 → logseq_matryca_parser-1.2.1}/tests/test_synapse.py +0 -0
@@ -68,3 +68,6 @@ tests/fixtures/*.md
68
68
  .vscode/
69
69
  .idea/
70
70
  .clinerules
71
+
72
+ # Esclude lo storico delle metriche per preservare il contesto LLM
73
+ metrics/history.json
@@ -0,0 +1,4 @@
1
+ # Default owners for all files in this repository.
2
+ # See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
3
+
4
+ * @MarcoPorcellato
@@ -0,0 +1,11 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Security vulnerability
4
+ url: https://github.com/MarcoPorcellato/logseq-matryca-parser/security/policy
5
+ about: Report a security issue privately — do not open a public issue
6
+ - name: Contributing guidelines
7
+ url: https://github.com/MarcoPorcellato/logseq-matryca-parser/blob/main/CONTRIBUTING.md
8
+ about: Read how to set up your environment, run tests, and open a pull request
9
+ - name: Code of Conduct
10
+ url: https://github.com/MarcoPorcellato/logseq-matryca-parser/blob/main/CODE_OF_CONDUCT.md
11
+ about: Community standards and how to report unacceptable behavior
@@ -0,0 +1,49 @@
1
+ name: Logos Protocol CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ pull_request:
7
+ branches: [ "main" ]
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ build:
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ python-version: [ "3.12", "3.13" ]
23
+
24
+ steps:
25
+ - name: Checkout Code
26
+ uses: actions/checkout@v6
27
+
28
+ - name: Install uv
29
+ uses: astral-sh/setup-uv@v6
30
+ with:
31
+ python-version: ${{ matrix.python-version }}
32
+ enable-cache: true
33
+
34
+ - name: Sync dependencies
35
+ run: uv sync --all-extras
36
+
37
+ - name: Audit dependencies
38
+ run: |
39
+ uv export --no-dev --no-emit-workspace --no-hashes -o "${{ runner.temp }}/requirements-audit.txt"
40
+ uv run pip-audit -r "${{ runner.temp }}/requirements-audit.txt"
41
+
42
+ - name: Lint
43
+ run: make lint
44
+
45
+ - name: Type check
46
+ run: make check
47
+
48
+ - name: Test
49
+ run: make test
@@ -0,0 +1,37 @@
1
+ name: CodeQL
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ pull_request:
7
+ branches: [ "main" ]
8
+
9
+ jobs:
10
+ analyze:
11
+ name: Analyze
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ security-events: write
15
+ packages: read
16
+ actions: read
17
+ contents: read
18
+
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ language: [ "python" ]
23
+
24
+ steps:
25
+ - name: Checkout repository
26
+ uses: actions/checkout@v6
27
+
28
+ - name: Initialize CodeQL
29
+ uses: github/codeql-action/init@v3
30
+ with:
31
+ languages: ${{ matrix.language }}
32
+
33
+ - name: Autobuild
34
+ uses: github/codeql-action/autobuild@v3
35
+
36
+ - name: Perform CodeQL Analysis
37
+ uses: github/codeql-action/analyze@v3
@@ -0,0 +1,145 @@
1
+ name: Daily Metrics Saver
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '0 3 * * *' # Gira ogni giorno alle 03:00 UTC
6
+ workflow_dispatch: # Permette l'avvio manuale con un click
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ env:
12
+ # Forza l'ambiente di esecuzione su Node.js 24 per prevenire i warning di deprecazione di giugno 2026
13
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
14
+
15
+ jobs:
16
+ save-metrics:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout Repository
20
+ uses: actions/checkout@v4
21
+ with:
22
+ fetch-depth: 0
23
+
24
+ - name: Set up Python
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: '3.11'
28
+
29
+ - name: Fetch and Merge Metrics
30
+ env:
31
+ GITHUB_TOKEN: ${{ secrets.METRICS_TOKEN }}
32
+ REPO_SLUG: ${{ github.repository }}
33
+ run: |
34
+ python -c "
35
+ import os, json, sys, datetime
36
+ from urllib.request import Request, urlopen
37
+ from urllib.error import HTTPError
38
+ token = os.environ.get('GITHUB_TOKEN')
39
+ repo = os.environ.get('REPO_SLUG')
40
+ if not token:
41
+ print('Errore critico: METRICS_TOKEN non trovato nei Secrets!')
42
+ sys.exit(1)
43
+
44
+ headers = {
45
+ 'Authorization': f'Bearer {token}',
46
+ 'Accept': 'application/vnd.github.v3+json'
47
+ }
48
+
49
+ def fetch_api(url):
50
+ try:
51
+ req = Request(url, headers=headers)
52
+ with urlopen(req) as response:
53
+ return json.loads(response.read().decode())
54
+ except HTTPError as e:
55
+ print(f'Errore API HTTP {e.code} per {url}: {e.reason}')
56
+ return None
57
+ except Exception as e:
58
+ print(f'Errore generico nel fetching di {url}: {e}')
59
+ return None
60
+
61
+ # 1. Recupera tutti i dati di traffico (inclusi i nuovi endpoint)
62
+ views_data = fetch_api(f'https://api.github.com/repos/{repo}/traffic/views')
63
+ clones_data = fetch_api(f'https://api.github.com/repos/{repo}/traffic/clones')
64
+ referrers_data = fetch_api(f'https://api.github.com/repos/{repo}/traffic/popular/referrers')
65
+ paths_data = fetch_api(f'https://api.github.com/repos/{repo}/traffic/popular/paths')
66
+ releases_data = fetch_api(f'https://api.github.com/repos/{repo}/releases')
67
+
68
+ # 2. Prepara la cartella e la struttura dello storico
69
+ os.makedirs('metrics', exist_ok=True)
70
+ history_file = 'metrics/history.json'
71
+
72
+ if os.path.exists(history_file):
73
+ with open(history_file, 'r') as f:
74
+ try:
75
+ history = json.load(f)
76
+ except:
77
+ history = {}
78
+ else:
79
+ history = {}
80
+
81
+ # Inizializza i nodi se mancanti
82
+ for key in ['views', 'clones', 'releases', 'referrers', 'popular_content']:
83
+ if key not in history:
84
+ history[key] = {}
85
+
86
+ today = datetime.datetime.utcnow().strftime('%Y-%m-%d')
87
+
88
+ # 3. Storicizza le Views (Ultimi 14 giorni)
89
+ v_days_added = []
90
+ if views_data and 'views' in views_data:
91
+ for v in views_data['views']:
92
+ day = v['timestamp'][:10]
93
+ history['views'][day] = {'count': v['count'], 'uniques': v['uniques']}
94
+ v_days_added.append(day)
95
+ print(f'-> [INFO] Rilevate {len(v_days_added)} giornate di traffico (Views).')
96
+
97
+ # 4. Storicizza i Clones (Ultimi 14 giorni)
98
+ c_days_added = []
99
+ if clones_data and 'clones' in clones_data:
100
+ for c in clones_data['clones']:
101
+ day = c['timestamp'][:10]
102
+ history['clones'][day] = {'count': c['count'], 'uniques': c['uniques']}
103
+ c_days_added.append(day)
104
+ print(f'-> [INFO] Rilevate {len(c_days_added)} giornate di clonazione (Clones).')
105
+
106
+ # 5. Nuovo: Snapshot quotidiano dei Referring Sites (Siti di provenienza)
107
+ if referrers_data:
108
+ history['referrers'][today] = [
109
+ {'referrer': r['referrer'], 'count': r['count'], 'uniques': r['uniques']}
110
+ for r in referrers_data
111
+ ]
112
+ print(f'-> [INFO] Snapshot dei Referring Sites archiviato per la data: {today}')
113
+
114
+ # 6. Nuovo: Snapshot quotidiano dei Popular Paths (Contenuto popolare)
115
+ if paths_data:
116
+ history['popular_content'][today] = [
117
+ {'path': p['path'], 'title': p['title'], 'count': p['count'], 'uniques': p['uniques']}
118
+ for p in paths_data
119
+ ]
120
+ print(f'-> [INFO] Snapshot del Popular Content archiviato per la data: {today}')
121
+
122
+ # 7. Snapshot cumulativo dei download delle release
123
+ if releases_data:
124
+ history['releases'][today] = [
125
+ {
126
+ 'tag': r['tag_name'],
127
+ 'assets': [{a['name']: a['download_count']} for a in r.get('assets', [])]
128
+ }
129
+ for r in releases_data
130
+ ]
131
+ print(f'-> [INFO] Snapshot dei download release registrato.')
132
+
133
+ # 8. Scrivi lo storico aggiornato su disco
134
+ with open(history_file, 'w') as f:
135
+ json.dump(history, f, indent=2)
136
+
137
+ print('✓ Database JSON delle metriche aggiornato con successo con i nuovi tracciamenti!')
138
+ "
139
+
140
+ - name: Commit & Push Changes
141
+ run: |
142
+ git config --local user.email "action@github.com"
143
+ git config --local user.name "GitHub Action Bot"
144
+ git add metrics/history.json
145
+ git diff --quiet && git diff --staged --quiet || (git commit -m "chore(analytics): archive comprehensive repository metrics [skip ci]" && git push)
@@ -0,0 +1,53 @@
1
+ name: GitHub Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+ inputs:
9
+ tag:
10
+ description: "Existing tag to publish (e.g. v1.1.1)"
11
+ required: true
12
+ type: string
13
+
14
+ permissions:
15
+ contents: write
16
+
17
+ jobs:
18
+ release:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v6
23
+ with:
24
+ fetch-depth: 0
25
+
26
+ - name: Resolve tag name
27
+ id: tag
28
+ run: |
29
+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
30
+ echo "name=${{ inputs.tag }}" >> "$GITHUB_OUTPUT"
31
+ else
32
+ echo "name=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
33
+ fi
34
+
35
+ - name: Build release notes from CHANGELOG
36
+ id: notes
37
+ run: |
38
+ BODY_FILE="$(mktemp)"
39
+ python scripts/extract_changelog.py "${{ steps.tag.outputs.name }}" > "$BODY_FILE"
40
+ {
41
+ echo "body<<CHANGELOG_EOF"
42
+ cat "$BODY_FILE"
43
+ echo "CHANGELOG_EOF"
44
+ } >> "$GITHUB_OUTPUT"
45
+
46
+ - name: Create or update GitHub Release
47
+ uses: softprops/action-gh-release@v2
48
+ with:
49
+ tag_name: ${{ steps.tag.outputs.name }}
50
+ name: ${{ steps.tag.outputs.name }}
51
+ body: ${{ steps.notes.outputs.body }}
52
+ generate_release_notes: false
53
+ make_latest: true
@@ -10,7 +10,32 @@ permissions:
10
10
  id-token: write
11
11
 
12
12
  jobs:
13
+ pre-flight:
14
+ name: Pre-flight checks (Python ${{ matrix.python-version }})
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ python-version: [ "3.12", "3.13" ]
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v6
23
+
24
+ - name: Install uv
25
+ uses: astral-sh/setup-uv@v6
26
+ with:
27
+ python-version: ${{ matrix.python-version }}
28
+ enable-cache: true
29
+
30
+ - name: Sync dependencies
31
+ run: uv sync --all-extras
32
+
33
+ - name: Run quality gate
34
+ run: make all
35
+
13
36
  publish:
37
+ name: Publish
38
+ needs: pre-flight
14
39
  runs-on: ubuntu-latest
15
40
  environment:
16
41
  name: pypi
@@ -0,0 +1,19 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.15.12
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix]
7
+ - repo: https://github.com/pre-commit/mirrors-mypy
8
+ rev: v1.20.2
9
+ hooks:
10
+ - id: mypy
11
+ pass_filenames: false
12
+ args: [src/, tests/, examples/]
13
+ additional_dependencies:
14
+ - pydantic>=2.7.0
15
+ - typer>=0.12.0
16
+ - rich>=13.7.1
17
+ - pytest>=9.0.3
18
+ - networkx>=3.0.0
19
+ - pyvis>=0.3.2
@@ -0,0 +1,90 @@
1
+ # Changelog
2
+
3
+ All notable changes to **logseq-matryca-parser** (The Logos Protocol) are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [1.2.1] - 2026-06-18
11
+
12
+ ### Added
13
+
14
+ - **Community health files** — `CODE_OF_CONDUCT.md` (Contributor Covenant 2.1), `.github/CODEOWNERS`, and `.github/ISSUE_TEMPLATE/config.yml` for GitHub Community Standards compliance.
15
+ - **PyPI project URLs** — `Repository`, `Source`, `Documentation`, and `Changelog` links in `pyproject.toml`.
16
+ - **Coverage gate** — `pytest-cov` in the dev group; `make test` enforces `--cov-fail-under=80` with `[tool.coverage.*]` in `pyproject.toml`.
17
+ - **CodeQL workflow** — `.github/workflows/codeql.yml` for Python SAST on push/PR to `main`.
18
+ - **PyPI pre-flight** — `pypi_publish.yml` runs `make all` via `uv` before building and publishing a tag.
19
+ - **CI Python matrix** — GitHub Actions tests Python **3.12** and **3.13** in `ci.yml` and PyPI pre-flight.
20
+
21
+ ### Changed
22
+
23
+ - **CI toolchain** — `.github/workflows/ci.yml` uses `astral-sh/setup-uv` and runs `uv sync --all-extras` followed by `make lint`, `make check`, and `make test` (parity with local `make all`).
24
+ - **CONTRIBUTING.md** — development setup documents `uv sync --all-extras` instead of `pip install -e .`.
25
+ - **Pre-commit** — Ruff and Mypy hook versions aligned with the `dev` dependency group in `pyproject.toml`.
26
+ - **Mypy scope** — unified to `src/`, `tests/`, and `examples/` in the Makefile, CI, CONTRIBUTING, and pre-commit.
27
+ - **CI security** — `pip-audit` on exported production requirements and `concurrency` cancel-in-progress on the same ref.
28
+ - **Version sync test** — `tests/test_package_version.py` asserts `__version__` matches `importlib.metadata.version(...)`.
29
+ - **Documentation layout** — root `ROADMAP_*.md` files consolidated under `docs/roadmaps/`.
30
+ - **README badges** — Python support badge updated to **3.12 | 3.13**; CI badge links directly to the workflow.
31
+ - **PyPI classifiers** — `Programming Language :: Python :: 3.13` added in `pyproject.toml`.
32
+
33
+ ## [1.2.0] - 2026-05-29
34
+
35
+ ### Added
36
+
37
+ - **Asset extraction** — `LogseqNode.assets` collects markdown images, `{{pdf}}` macros, and local `[label](path)` attachments; `resolve_asset_path` decodes percent-encoded paths (`%20`).
38
+ - **YAML frontmatter** — `---` blocks at file start populate `LogseqPage.properties` like native Logseq page properties.
39
+ - **`page-tags::`** — block and page properties named `page-tags` inject implicit graph tokens like `tags::`.
40
+
41
+ ### Fixed
42
+
43
+ - **Round-trip serialization** — soft-break continuations no longer double-indent; list-shaped block properties (`tags::` + bullets) serialize as Logseq bullet lists instead of Python repr; `:LOGBOOK:` drawers and derived temporal fields (`scheduled::`, `repeater::`, …) are not emitted as bogus `key::` lines; YAML frontmatter pages round-trip with `---` fences and stable block UUIDs; `title` from YAML or `title::` frontmatter overrides the graph page title for deterministic IDs.
44
+ - **Property comma-split in wikilinks** — `tags::` / `alias::` comma separation ignores commas inside `[[...]]` tokens.
45
+ - **Properties after code fences** — `key::` lines immediately following a closing fence are parsed into block properties (Logseq contiguity exception).
46
+ - **Org warning periods** — `DEADLINE` / `SCHEDULED` payloads with `-3d`-style warning periods parse without datetime failures.
47
+ - **Quoted property values** — outer `"` / `'` are stripped from block property values in the AST.
48
+ - **Query macro shielding** — `{{query}}` / `{{advancedquery}}` inline macros do not emit false wikilink graph tokens (embed macros still do).
49
+ - **Case-insensitive page routing** — `LogseqGraph.get_page` and `resolve_relative_page_link` resolve titles via a lowercase index (Datomic / Logseq parity).
50
+ - **HTML comment shielding** — wikilinks and tags inside `<!-- ... -->` are masked before entity extraction (no ghost graph links).
51
+ - **Graph token parity** — list-shaped block properties (`tags::` with bullets) feed wikilinks/tags into the AST; page-level properties (YAML and `key::` frontmatter) merge into `page.refs`.
52
+ - **Temporal ranges and repeaters** — `SCHEDULED` / `DEADLINE` markers with `HH:MM - HH:MM` ranges parse using the start time; repeater tokens (`.+1w`, `++1d`) are stripped before datetime parsing.
53
+ - **Legacy namespace filenames** — `filename_to_page_title` decodes `___`, `%2F`, and Dendron-style `.` separators.
54
+ - **BOM-prefixed graph files** — `parse_page_file` reads with `utf-8-sig` so Windows-synced BOM bytes do not break the first bullet.
55
+ - **Markdown escape shielding** — `\#` and `\[\[` no longer yield tags or wikilinks in graph metadata.
56
+ - **Empty bullets** — bare `-` / `*` lines parse as empty blocks instead of failing `BULLET_PATTERN`.
57
+ - **Wikilink header anchors** — `[[Page#Section]]` resolves to the page name only for graph routing.
58
+ - **Hybrid alias links** — `[Alias]([[Page]])` is no longer treated as a file asset.
59
+
60
+ ## [1.1.1] - 2026-05-28
61
+
62
+ ### Added
63
+
64
+ - **Graph page aliases** — `LogseqGraph.load_directory` honors `title::`, `alias::` / `aliases::` for `pages` lookup and backlinks; incremental reload re-applies enrichment after watcher edits.
65
+ - **LaTeX math shielding** — `_shield_inline_code` masks `$$...$$` and `$...$` spans so wikilinks/tags inside equations are not extracted.
66
+ - **Datalog query dead zones** — `#+BEGIN_QUERY` … `#+END_QUERY` blocks are ignored for entity extraction (parse-loop state plus shielding).
67
+ - **Numbered list blocks** — `logos_parser.py` recognizes ordered-list markers (`1. `, `12. `, etc.) as outliner bullets alongside `-` and `*`.
68
+ - **Markdown task checkboxes** — `[ ]`, `[-]`, and `[x]`/`[X]` on block text map to `TODO`, `DOING`, and `DONE` before Org-mode prefix fallback.
69
+
70
+ ### Fixed
71
+
72
+ - **Logseq OG parity (parser)** — `{{embed [[Page]]}}` and similar macros expose nested wikilinks; Unicode tags and markdown boundaries (`**#tag**`, `==#tag==`); comma-separated `tags::` / `alias::` / `aliases::` inject implicit graph tokens; `~~~` fences share code-block immunity with ` ``` ` fences.
73
+ - **Property contiguity** — block `key:: value` lines apply only while contiguous below the bullet; after a soft-break, later `key::` lines stay in `content` / `clean_text` (Logseq-native behavior).
74
+ - **Property bullet lists** — empty `alias::` / `tags::` followed by indented `-` bullets serialize as `list[str]` without orphan AST children.
75
+ - **Case-insensitive property keys** — all property keys normalized to lowercase at parse time; `TITLE::` frontmatter overrides graph page titles like `title::`.
76
+ - **Extended task markers** — `DELEGATED`, `POSTPONED`, `IN-PROGRESS` (longest-prefix matching) alongside existing Org-mode statuses.
77
+ - **Aliased block references** — `[Visible](((uuid)))` clean text retains visible alias only (no surrounding `[` `]`).
78
+
79
+ ## [1.0.0] - 2026-05-28
80
+
81
+ ### Added
82
+
83
+ - **LOGOS engine** — deterministic Stack-Machine parser (`StackMachineParser`) producing strict `LogseqPage` / `LogseqNode` ASTs from Spatial Markdown.
84
+ - **SYNAPSE adapters** — LangChain and LlamaIndex exporters with parent-child lineage metadata.
85
+ - **FORGE exporters** — JSON, Markdown, Obsidian, and enriched chunk payloads.
86
+ - **LENS visualizer** — interactive topology HTML via NetworkX / PyVis.
87
+ - **KINETIC CLI** — `matryca-parse` Typer entry point for export, visualization, and agent read/write workflows.
88
+ - **Headless CRUD** — append-only agent writer and X-Ray press utilities for sovereign graph mutation.
89
+ - **Logseq-native serialization** — round-trip page and block property layout via `logseq_markdown.py`.
90
+ - **Graph query layer** — `LogseqGraph` with backlinks, effective property inheritance, and optional filesystem watcher.
@@ -0,0 +1,132 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ **marco@marcoporcellato.it**.
64
+
65
+ All complaints will be reviewed and investigated promptly and fairly.
66
+
67
+ All community leaders are obligated to respect the privacy and security of the
68
+ reporter of any incident.
69
+
70
+ ## Enforcement Guidelines
71
+
72
+ Community leaders will follow these Community Impact Guidelines in determining
73
+ the consequences for any action they deem in violation of this Code of Conduct:
74
+
75
+ ### 1. Correction
76
+
77
+ **Community Impact**: Use of inappropriate language or other behavior deemed
78
+ unprofessional or unwelcome in the community.
79
+
80
+ **Consequence**: A private, written warning from community leaders, providing
81
+ clarity around the nature of the violation and an explanation of why the
82
+ behavior was inappropriate. A public apology may be requested.
83
+
84
+ ### 2. Warning
85
+
86
+ **Community Impact**: A violation through a single incident or series of acts.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][mozilla].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][faq]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [mozilla]: https://github.com/mozilla/diversity
131
+ [faq]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations