@laitszkin/apollo-toolkit 3.13.2 → 3.14.0
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.
- package/AGENTS.md +7 -7
- package/CHANGELOG.md +27 -0
- package/CLAUDE.md +8 -8
- package/analyse-app-logs/SKILL.md +3 -3
- package/bin/apollo-toolkit.ts +7 -0
- package/codex/codex-memory-manager/SKILL.md +2 -2
- package/codex/learn-skill-from-conversations/SKILL.md +3 -3
- package/dist/bin/apollo-toolkit.d.ts +2 -0
- package/dist/bin/apollo-toolkit.js +7 -0
- package/dist/lib/cli.d.ts +41 -0
- package/dist/lib/cli.js +655 -0
- package/dist/lib/installer.d.ts +59 -0
- package/dist/lib/installer.js +404 -0
- package/dist/lib/tool-runner.d.ts +19 -0
- package/dist/lib/tool-runner.js +536 -0
- package/dist/lib/tools/architecture.d.ts +2 -0
- package/dist/lib/tools/architecture.js +34 -0
- package/dist/lib/tools/create-specs.d.ts +2 -0
- package/dist/lib/tools/create-specs.js +175 -0
- package/dist/lib/tools/docs-to-voice.d.ts +2 -0
- package/dist/lib/tools/docs-to-voice.js +705 -0
- package/dist/lib/tools/enforce-video-aspect-ratio.d.ts +2 -0
- package/dist/lib/tools/enforce-video-aspect-ratio.js +312 -0
- package/dist/lib/tools/extract-conversations.d.ts +2 -0
- package/dist/lib/tools/extract-conversations.js +105 -0
- package/dist/lib/tools/extract-pdf-text.d.ts +2 -0
- package/dist/lib/tools/extract-pdf-text.js +92 -0
- package/dist/lib/tools/filter-logs.d.ts +2 -0
- package/dist/lib/tools/filter-logs.js +94 -0
- package/dist/lib/tools/find-github-issues.d.ts +2 -0
- package/dist/lib/tools/find-github-issues.js +176 -0
- package/dist/lib/tools/generate-storyboard-images.d.ts +2 -0
- package/dist/lib/tools/generate-storyboard-images.js +419 -0
- package/dist/lib/tools/log-cli-utils.d.ts +35 -0
- package/dist/lib/tools/log-cli-utils.js +233 -0
- package/dist/lib/tools/open-github-issue.d.ts +2 -0
- package/dist/lib/tools/open-github-issue.js +750 -0
- package/dist/lib/tools/read-github-issue.d.ts +2 -0
- package/dist/lib/tools/read-github-issue.js +134 -0
- package/dist/lib/tools/render-error-book.d.ts +2 -0
- package/dist/lib/tools/render-error-book.js +265 -0
- package/dist/lib/tools/render-katex.d.ts +2 -0
- package/dist/lib/tools/render-katex.js +294 -0
- package/dist/lib/tools/review-threads.d.ts +2 -0
- package/dist/lib/tools/review-threads.js +491 -0
- package/dist/lib/tools/search-logs.d.ts +2 -0
- package/dist/lib/tools/search-logs.js +164 -0
- package/dist/lib/tools/sync-memory-index.d.ts +2 -0
- package/dist/lib/tools/sync-memory-index.js +113 -0
- package/dist/lib/tools/validate-openai-agent-config.d.ts +2 -0
- package/dist/lib/tools/validate-openai-agent-config.js +184 -0
- package/dist/lib/tools/validate-skill-frontmatter.d.ts +2 -0
- package/dist/lib/tools/validate-skill-frontmatter.js +118 -0
- package/dist/lib/types.d.ts +82 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/updater.d.ts +34 -0
- package/dist/lib/updater.js +112 -0
- package/dist/lib/utils/format.d.ts +2 -0
- package/dist/lib/utils/format.js +6 -0
- package/dist/lib/utils/terminal.d.ts +12 -0
- package/dist/lib/utils/terminal.js +26 -0
- package/docs-to-voice/SKILL.md +0 -1
- package/generate-spec/SKILL.md +1 -1
- package/katex/SKILL.md +1 -2
- package/lib/cli.ts +780 -0
- package/lib/installer.ts +466 -0
- package/lib/tool-runner.ts +561 -0
- package/lib/tools/architecture.ts +34 -0
- package/lib/tools/create-specs.ts +204 -0
- package/lib/tools/docs-to-voice.ts +799 -0
- package/lib/tools/enforce-video-aspect-ratio.ts +368 -0
- package/lib/tools/extract-conversations.ts +114 -0
- package/lib/tools/extract-pdf-text.ts +99 -0
- package/lib/tools/filter-logs.ts +118 -0
- package/lib/tools/find-github-issues.ts +211 -0
- package/lib/tools/generate-storyboard-images.ts +455 -0
- package/lib/tools/log-cli-utils.ts +262 -0
- package/lib/tools/open-github-issue.ts +930 -0
- package/lib/tools/read-github-issue.ts +179 -0
- package/lib/tools/render-error-book.ts +300 -0
- package/lib/tools/render-katex.ts +325 -0
- package/lib/tools/review-threads.ts +590 -0
- package/lib/tools/search-logs.ts +200 -0
- package/lib/tools/sync-memory-index.ts +114 -0
- package/lib/tools/validate-openai-agent-config.ts +209 -0
- package/lib/tools/validate-skill-frontmatter.ts +124 -0
- package/lib/types.ts +90 -0
- package/lib/updater.ts +165 -0
- package/lib/utils/format.ts +7 -0
- package/lib/utils/terminal.ts +22 -0
- package/open-github-issue/SKILL.md +2 -2
- package/optimise-skill/SKILL.md +1 -1
- package/package.json +13 -4
- package/resources/project-architecture/assets/architecture.css +764 -0
- package/resources/project-architecture/assets/viewer.client.js +144 -0
- package/resources/project-architecture/index.html +42 -0
- package/review-spec-related-changes/SKILL.md +1 -1
- package/solve-issues-found-during-review/SKILL.md +2 -1
- package/tsconfig.json +28 -0
- package/analyse-app-logs/scripts/__pycache__/filter_logs_by_time.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/__pycache__/log_cli_utils.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/__pycache__/search_logs.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/filter_logs_by_time.py +0 -64
- package/analyse-app-logs/scripts/log_cli_utils.py +0 -112
- package/analyse-app-logs/scripts/search_logs.py +0 -137
- package/analyse-app-logs/tests/test_filter_logs_by_time.py +0 -95
- package/analyse-app-logs/tests/test_search_logs.py +0 -100
- package/codex/codex-memory-manager/scripts/extract_recent_conversations.py +0 -369
- package/codex/codex-memory-manager/scripts/sync_memory_index.py +0 -130
- package/codex/codex-memory-manager/tests/test_extract_recent_conversations.py +0 -177
- package/codex/codex-memory-manager/tests/test_memory_template.py +0 -37
- package/codex/codex-memory-manager/tests/test_sync_memory_index.py +0 -84
- package/codex/learn-skill-from-conversations/scripts/extract_recent_conversations.py +0 -369
- package/codex/learn-skill-from-conversations/tests/test_extract_recent_conversations.py +0 -177
- package/docs-to-voice/scripts/__pycache__/docs_to_voice.cpython-312.pyc +0 -0
- package/docs-to-voice/scripts/docs_to_voice.py +0 -1385
- package/docs-to-voice/scripts/docs_to_voice.sh +0 -11
- package/docs-to-voice/tests/test_docs_to_voice_api_max_chars.py +0 -210
- package/docs-to-voice/tests/test_docs_to_voice_sentence_timeline.py +0 -115
- package/docs-to-voice/tests/test_docs_to_voice_settings.py +0 -43
- package/docs-to-voice/tests/test_docs_to_voice_shell_wrapper.py +0 -51
- package/docs-to-voice/tests/test_docs_to_voice_speech_rate.py +0 -57
- package/generate-spec/scripts/__pycache__/create-specscpython-312.pyc +0 -0
- package/generate-spec/scripts/create-specs +0 -215
- package/generate-spec/tests/test_create_specs.py +0 -200
- package/init-project-html/scripts/architecture-bootstrap-render.js +0 -16
- package/init-project-html/scripts/architecture.js +0 -296
- package/katex/scripts/__pycache__/render_katex.cpython-312.pyc +0 -0
- package/katex/scripts/render_katex.py +0 -247
- package/katex/scripts/render_katex.sh +0 -11
- package/katex/tests/test_render_katex.py +0 -174
- package/learning-error-book/scripts/render_error_book_json_to_pdf.py +0 -590
- package/learning-error-book/tests/test_render_error_book_json_to_pdf.py +0 -134
- package/open-github-issue/scripts/__pycache__/open_github_issue.cpython-312.pyc +0 -0
- package/open-github-issue/scripts/open_github_issue.py +0 -705
- package/open-github-issue/tests/test_open_github_issue.py +0 -381
- package/openai-text-to-image-storyboard/scripts/generate_storyboard_images.py +0 -763
- package/openai-text-to-image-storyboard/tests/test_generate_storyboard_images.py +0 -177
- package/read-github-issue/scripts/__pycache__/find_issues.cpython-312.pyc +0 -0
- package/read-github-issue/scripts/__pycache__/read_issue.cpython-312.pyc +0 -0
- package/read-github-issue/scripts/find_issues.py +0 -148
- package/read-github-issue/scripts/read_issue.py +0 -108
- package/read-github-issue/tests/test_find_issues.py +0 -127
- package/read-github-issue/tests/test_read_issue.py +0 -109
- package/resolve-review-comments/scripts/__pycache__/review_threads.cpython-312.pyc +0 -0
- package/resolve-review-comments/scripts/review_threads.py +0 -425
- package/resolve-review-comments/tests/test_review_threads.py +0 -74
- package/scripts/validate_openai_agent_config.py +0 -209
- package/scripts/validate_skill_frontmatter.py +0 -131
- package/text-to-short-video/scripts/__pycache__/enforce_video_aspect_ratio.cpython-312.pyc +0 -0
- package/text-to-short-video/scripts/enforce_video_aspect_ratio.py +0 -350
- package/text-to-short-video/tests/test_enforce_video_aspect_ratio.py +0 -194
- package/weekly-financial-event-report/scripts/extract_pdf_text_pdfkit.swift +0 -99
- package/weekly-financial-event-report/tests/test_extract_pdf_text_pdfkit.py +0 -64
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env swift
|
|
2
|
-
|
|
3
|
-
import Foundation
|
|
4
|
-
import PDFKit
|
|
5
|
-
|
|
6
|
-
let helpText = """
|
|
7
|
-
apltk extract-pdf-text-pdfkit — extract PDF text with macOS PDFKit.
|
|
8
|
-
|
|
9
|
-
Usage:
|
|
10
|
-
apltk extract-pdf-text-pdfkit /absolute/path/to/source.pdf
|
|
11
|
-
swift weekly-financial-event-report/scripts/extract_pdf_text_pdfkit.swift /absolute/path/to/source.pdf
|
|
12
|
-
|
|
13
|
-
Use this when:
|
|
14
|
-
- You need a simple macOS PDFKit-based text extraction fallback.
|
|
15
|
-
|
|
16
|
-
Examples:
|
|
17
|
-
apltk extract-pdf-text-pdfkit /absolute/path/to/source.pdf
|
|
18
|
-
Result: prints `PDF_PATH=...`, `PAGE_COUNT=...`, and one `=== PAGE N ===` section per extracted page.
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
struct Arguments {
|
|
22
|
-
let pdfPath: String
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
enum ExtractionError: Error, CustomStringConvertible {
|
|
26
|
-
case missingPath
|
|
27
|
-
case unsupportedPlatform
|
|
28
|
-
case unreadablePDF(String)
|
|
29
|
-
|
|
30
|
-
var description: String {
|
|
31
|
-
switch self {
|
|
32
|
-
case .missingPath:
|
|
33
|
-
return "Usage: swift scripts/extract_pdf_text_pdfkit.swift /absolute/path/to/source.pdf\nRun with --help for the full command guide."
|
|
34
|
-
case .unsupportedPlatform:
|
|
35
|
-
return "PDFKit extraction is only supported on macOS."
|
|
36
|
-
case .unreadablePDF(let path):
|
|
37
|
-
return "Unable to open PDF at \(path)"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
enum ParseResult {
|
|
43
|
-
case help
|
|
44
|
-
case arguments(Arguments)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
func parseArguments() throws -> ParseResult {
|
|
48
|
-
let args = Array(CommandLine.arguments.dropFirst())
|
|
49
|
-
if args.contains("--help") || args.contains("-h") {
|
|
50
|
-
return .help
|
|
51
|
-
}
|
|
52
|
-
guard let pdfPath = args.first, !pdfPath.isEmpty else {
|
|
53
|
-
throw ExtractionError.missingPath
|
|
54
|
-
}
|
|
55
|
-
return .arguments(Arguments(pdfPath: pdfPath))
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
func main() throws {
|
|
59
|
-
#if !os(macOS)
|
|
60
|
-
throw ExtractionError.unsupportedPlatform
|
|
61
|
-
#else
|
|
62
|
-
switch try parseArguments() {
|
|
63
|
-
case .help:
|
|
64
|
-
print(helpText)
|
|
65
|
-
return
|
|
66
|
-
case .arguments(let arguments):
|
|
67
|
-
let pdfURL = URL(fileURLWithPath: arguments.pdfPath)
|
|
68
|
-
|
|
69
|
-
guard let document = PDFDocument(url: pdfURL) else {
|
|
70
|
-
throw ExtractionError.unreadablePDF(arguments.pdfPath)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
print("PDF_PATH=\(arguments.pdfPath)")
|
|
74
|
-
print("PAGE_COUNT=\(document.pageCount)")
|
|
75
|
-
|
|
76
|
-
for pageIndex in 0..<document.pageCount {
|
|
77
|
-
guard let page = document.page(at: pageIndex) else {
|
|
78
|
-
continue
|
|
79
|
-
}
|
|
80
|
-
let text = page.string?
|
|
81
|
-
.replacingOccurrences(of: "\u{000C}", with: "\n")
|
|
82
|
-
.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
|
|
83
|
-
print("=== PAGE \(pageIndex + 1) ===")
|
|
84
|
-
if text.isEmpty {
|
|
85
|
-
print("[NO_TEXT_EXTRACTED]")
|
|
86
|
-
} else {
|
|
87
|
-
print(text)
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
#endif
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
do {
|
|
95
|
-
try main()
|
|
96
|
-
} catch {
|
|
97
|
-
fputs("\(error)\n", stderr)
|
|
98
|
-
exit(1)
|
|
99
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
import importlib.util
|
|
6
|
-
import shutil
|
|
7
|
-
import subprocess
|
|
8
|
-
import sys
|
|
9
|
-
import tempfile
|
|
10
|
-
import unittest
|
|
11
|
-
from pathlib import Path
|
|
12
|
-
|
|
13
|
-
REPORTLAB_AVAILABLE = importlib.util.find_spec("reportlab") is not None
|
|
14
|
-
|
|
15
|
-
if REPORTLAB_AVAILABLE:
|
|
16
|
-
from reportlab.pdfgen import canvas
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
SCRIPT_PATH = Path(__file__).resolve().parents[1] / "scripts" / "extract_pdf_text_pdfkit.swift"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
@unittest.skipUnless(shutil.which("swift"), "swift is required for PDFKit script tests")
|
|
23
|
-
@unittest.skipUnless(sys.platform == "darwin", "PDFKit script tests only work on macOS")
|
|
24
|
-
class ExtractPdfTextPdfkitTests(unittest.TestCase):
|
|
25
|
-
def run_script(self, *args: str) -> subprocess.CompletedProcess[str]:
|
|
26
|
-
return subprocess.run(
|
|
27
|
-
["swift", str(SCRIPT_PATH), *args],
|
|
28
|
-
capture_output=True,
|
|
29
|
-
text=True,
|
|
30
|
-
check=False,
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
def test_missing_path_prints_usage(self) -> None:
|
|
34
|
-
result = self.run_script()
|
|
35
|
-
self.assertEqual(result.returncode, 1)
|
|
36
|
-
self.assertIn("Usage: swift scripts/extract_pdf_text_pdfkit.swift", result.stderr)
|
|
37
|
-
|
|
38
|
-
def test_unreadable_pdf_reports_missing_file(self) -> None:
|
|
39
|
-
result = self.run_script("/tmp/does-not-exist.pdf")
|
|
40
|
-
self.assertEqual(result.returncode, 1)
|
|
41
|
-
self.assertIn("Unable to open PDF", result.stderr)
|
|
42
|
-
|
|
43
|
-
@unittest.skipUnless(REPORTLAB_AVAILABLE, "reportlab is required to generate fixture PDFs")
|
|
44
|
-
def test_extracts_text_from_generated_pdf(self) -> None:
|
|
45
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
46
|
-
pdf_path = Path(temp_dir) / "sample.pdf"
|
|
47
|
-
pdf = canvas.Canvas(str(pdf_path))
|
|
48
|
-
pdf.drawString(72, 720, "Weekly event headline")
|
|
49
|
-
pdf.showPage()
|
|
50
|
-
pdf.drawString(72, 720, "Second page details")
|
|
51
|
-
pdf.save()
|
|
52
|
-
|
|
53
|
-
result = self.run_script(str(pdf_path))
|
|
54
|
-
|
|
55
|
-
self.assertEqual(result.returncode, 0, result.stderr)
|
|
56
|
-
self.assertIn(f"PDF_PATH={pdf_path}", result.stdout)
|
|
57
|
-
self.assertIn("PAGE_COUNT=2", result.stdout)
|
|
58
|
-
self.assertIn("=== PAGE 1 ===", result.stdout)
|
|
59
|
-
self.assertIn("Weekly event headline", result.stdout)
|
|
60
|
-
self.assertIn("Second page details", result.stdout)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if __name__ == "__main__":
|
|
64
|
-
unittest.main()
|