tzero-mcp 11.0.0 → 11.11.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/CHANGELOG.md +56 -56
- package/CONTRIBUTING.md +71 -71
- package/LICENSE +21 -21
- package/README.md +64 -64
- package/bin/tzero-mcp.js +62 -62
- package/bin/tzero.js +61 -61
- package/index.d.ts +25 -25
- package/index.js +15 -15
- package/package.json +89 -88
- package/src/addmcp.py +1203 -1197
- package/src/app.py +1810 -1810
- package/src/main.py +60 -60
- package/src/pc_fixer_mcp.py +25 -25
- package/src/tzero/__init__.py +54 -54
- package/src/tzero/__main__.py +6 -6
- package/src/tzero/siber_akademi_icon.py +77 -77
- package/src/tzero/tzero_arch_test.py +463 -463
- package/src/tzero/tzero_benchmark.py +475 -475
- package/src/tzero/tzero_blackboard.py +257 -257
- package/src/tzero/tzero_bridge.py +546 -546
- package/src/tzero/tzero_budget.py +195 -195
- package/src/tzero/tzero_card.py +431 -0
- package/src/tzero/tzero_ci.py +153 -153
- package/src/tzero/tzero_commit.py +192 -192
- package/src/tzero/tzero_contracts.py +1093 -1093
- package/src/tzero/tzero_cost.py +166 -166
- package/src/tzero/tzero_dashboard.py +1960 -1960
- package/src/tzero/tzero_debt.py +461 -461
- package/src/tzero/tzero_deps.py +462 -462
- package/src/tzero/tzero_drift.py +208 -208
- package/src/tzero/tzero_explain.py +306 -306
- package/src/tzero/tzero_features.py +3024 -3024
- package/src/tzero/tzero_federation.py +299 -299
- package/src/tzero/tzero_fix.py +557 -228
- package/src/tzero/tzero_fixer/__init__.py +63 -63
- package/src/tzero/tzero_fixer/amalgamation.py +334 -334
- package/src/tzero/tzero_fixer/ast_syntax_healer.py +464 -464
- package/src/tzero/tzero_fixer/ast_type_modernizer.py +288 -288
- package/src/tzero/tzero_fixer/async_io_modernizer.py +127 -127
- package/src/tzero/tzero_fixer/automated_regression_suite.py +600 -600
- package/src/tzero/tzero_fixer/benchmarks_and_diagnostics.py +174 -174
- package/src/tzero/tzero_fixer/ci_cd_self_healing_gate.py +246 -246
- package/src/tzero/tzero_fixer/code_duplicity_and_refactorer.py +151 -151
- package/src/tzero/tzero_fixer/code_smells_healer.py +260 -260
- package/src/tzero/tzero_fixer/cwe_remediator.py +171 -171
- package/src/tzero/tzero_fixer/dead_code_eliminator.py +150 -150
- package/src/tzero/tzero_fixer/dependency_vulnerability_auditor.py +309 -309
- package/src/tzero/tzero_fixer/git_advanced_surgeon.py +280 -280
- package/src/tzero/tzero_fixer/hardware_and_disk_doctor.py +325 -325
- package/src/tzero/tzero_fixer/import_graph_healer.py +412 -412
- package/src/tzero/tzero_fixer/interactive_tui.py +91 -91
- package/src/tzero/tzero_fixer/knowledge_base.py +295 -295
- package/src/tzero/tzero_fixer/knowledge_base_extended.py +940 -940
- package/src/tzero/tzero_fixer/linters_and_static_analyzer.py +307 -307
- package/src/tzero/tzero_fixer/mcp_server.py +489 -489
- package/src/tzero/tzero_fixer/models.py +385 -385
- package/src/tzero/tzero_fixer/orchestrator.py +375 -375
- package/src/tzero/tzero_fixer/os_doctor.py +502 -502
- package/src/tzero/tzero_fixer/packaging_abi_surgeon.py +323 -323
- package/src/tzero/tzero_fixer/pc_fixer_doctor.py +600 -600
- package/src/tzero/tzero_fixer/performance_and_memory_profiler.py +274 -274
- package/src/tzero/tzero_fixer/polyglot_ast_parsers.py +313 -313
- package/src/tzero/tzero_fixer/polyglot_build_healer.py +364 -364
- package/src/tzero/tzero_fixer/polyglot_config_healer.py +318 -318
- package/src/tzero/tzero_fixer/polyglot_doctor.py +372 -372
- package/src/tzero/tzero_fixer/polyglot_linters.py +619 -619
- package/src/tzero/tzero_fixer/polyglot_schema_validator.py +305 -305
- package/src/tzero/tzero_fixer/security_cwe_database.py +444 -444
- package/src/tzero/tzero_fixer/security_deep_rules.py +114 -114
- package/src/tzero/tzero_fixer/security_rules_catalog.py +110 -110
- package/src/tzero/tzero_fixer/security_zero_leak.py +326 -326
- package/src/tzero/tzero_fixer/smart_patch_recommender.py +223 -223
- package/src/tzero/tzero_fixer/synthetic_workspace_generator.py +220 -220
- package/src/tzero/tzero_fixer/system_diagnostics_extended.py +493 -493
- package/src/tzero/tzero_fixer/system_repair_recipes.py +447 -447
- package/src/tzero/tzero_fixer/venv_doctor.py +309 -309
- package/src/tzero/tzero_golden.py +319 -319
- package/src/tzero/tzero_graph_hud.html +338 -338
- package/src/tzero/tzero_graph_rag.py +263 -263
- package/src/tzero/tzero_growth.py +415 -0
- package/src/tzero/tzero_guard.py +251 -243
- package/src/tzero/tzero_hooks.py +565 -565
- package/src/tzero/tzero_infra.py +274 -274
- package/src/tzero/tzero_jarvis/__init__.py +134 -124
- package/src/tzero/tzero_jarvis/causal_graph.py +310 -310
- package/src/tzero/tzero_jarvis/creative_director.py +333 -0
- package/src/tzero/tzero_jarvis/graph_visualizer.py +395 -395
- package/src/tzero/tzero_jarvis/hybrid_search.py +214 -214
- package/src/tzero/tzero_jarvis/latent_press.py +137 -137
- package/src/tzero/tzero_jarvis/memory_consolidation.py +212 -212
- package/src/tzero/tzero_jarvis/minhash_lsh.py +184 -184
- package/src/tzero/tzero_jarvis/orchestrator.py +335 -335
- package/src/tzero/tzero_jarvis/self_healing.py +308 -308
- package/src/tzero/tzero_jarvis/semantic_compressor.py +887 -887
- package/src/tzero/tzero_jarvis/swarm.py +261 -261
- package/src/tzero/tzero_jarvis/swarm_bft.py +144 -144
- package/src/tzero/tzero_jarvis/workspace_orchestrator.py +1167 -1167
- package/src/tzero/tzero_jarvis/zero_key_router.py +173 -173
- package/src/tzero/tzero_lsp.py +634 -634
- package/src/tzero/tzero_mcp.py +5314 -5237
- package/src/tzero/tzero_mutation.py +358 -358
- package/src/tzero/tzero_neural_cortex.py +1425 -1425
- package/src/tzero/tzero_packer.py +577 -577
- package/src/tzero/tzero_patch.py +624 -624
- package/src/tzero/tzero_pc_fixer.py +12699 -12699
- package/src/tzero/tzero_pipe.py +95 -95
- package/src/tzero/tzero_polyglot.py +799 -799
- package/src/tzero/tzero_proxy.py +127 -127
- package/src/tzero/tzero_reachability.py +272 -272
- package/src/tzero/tzero_replay.py +141 -141
- package/src/tzero/tzero_rust_bridge.py +198 -198
- package/src/tzero/tzero_scip.py +368 -368
- package/src/tzero/tzero_security.py +573 -573
- package/src/tzero/tzero_semantic_merge.py +189 -189
- package/src/tzero/tzero_snapshot.py +471 -471
- package/src/tzero/tzero_stubs.py +313 -313
- package/src/tzero/tzero_subagent_engine.py +459 -459
- package/src/tzero/tzero_superdesign.py +774 -774
- package/src/tzero/tzero_sync.py +241 -241
- package/src/tzero/tzero_task_benchmark.py +506 -458
- package/src/tzero/tzero_tui.py +313 -313
- package/src/tzero/tzero_turbo.py +264 -264
- package/src/tzero/tzero_v3.py +9997 -9900
- package/src/tzero.py +6 -6
- package/src/tzero_mcp.py +25 -0
- package/test/package.test.js +55 -55
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""
|
|
3
|
+
T-ZERO JARVIS MULTI-MODAL CREATIVE DIRECTOR & PROMPT ENGINE
|
|
4
|
+
------------------------------------------------------------
|
|
5
|
+
Developer: Toprak Ahmet Aydoğmuş (Siber Akademi)
|
|
6
|
+
Version: 5.1.0 | License: MIT
|
|
7
|
+
|
|
8
|
+
Autonomous creative director that synthesizes ultra-photorealistic image prompts
|
|
9
|
+
(Midjourney v6.1, Flux.1 Pro, Imagen 3) and cinematic video generation prompts
|
|
10
|
+
(OpenAI Sora, Kling 1.5, Runway Gen-3 Alpha, Luma Dream Machine), as well as
|
|
11
|
+
viral 5-scene tech product launch storyboards directly from source code and AST.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
import os
|
|
17
|
+
import re
|
|
18
|
+
import ast
|
|
19
|
+
import json
|
|
20
|
+
from dataclasses import dataclass, field
|
|
21
|
+
from typing import Dict, List, Optional, Any
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@dataclass
|
|
25
|
+
class VideoPromptSpec:
|
|
26
|
+
tool: str
|
|
27
|
+
prompt: str
|
|
28
|
+
negative_prompt: str
|
|
29
|
+
camera_movement: str
|
|
30
|
+
lighting: str
|
|
31
|
+
fps: int
|
|
32
|
+
aspect_ratio: str
|
|
33
|
+
duration_seconds: int
|
|
34
|
+
audio_sfx_cue: str
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@dataclass
|
|
38
|
+
class PhotoPromptSpec:
|
|
39
|
+
engine: str
|
|
40
|
+
prompt: str
|
|
41
|
+
negative_prompt: str
|
|
42
|
+
camera_lens: str
|
|
43
|
+
lighting_setup: str
|
|
44
|
+
color_grade: str
|
|
45
|
+
aspect_ratio: str
|
|
46
|
+
parameters: str
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@dataclass
|
|
50
|
+
class StoryboardScene:
|
|
51
|
+
scene_number: int
|
|
52
|
+
timecode: str
|
|
53
|
+
scene_title: str
|
|
54
|
+
visual_description: str
|
|
55
|
+
camera_direction: str
|
|
56
|
+
voiceover_script: str
|
|
57
|
+
on_screen_text: str
|
|
58
|
+
audio_sfx: str
|
|
59
|
+
video_prompt: str
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class JarvisCreativeDirector:
|
|
63
|
+
"""Enterprise multi-modal prompt synthesis and storyboard director."""
|
|
64
|
+
|
|
65
|
+
LENS_PROFILES = {
|
|
66
|
+
"cinematic": "Arri Alexa Mini LF, 35mm Cooke Anamorphic /i Prime f/2.0, shallow depth of field, anamorphic oval bokeh",
|
|
67
|
+
"portrait": "Hasselblad H6D-100c, HC 100mm f/2.2, natural skin texture, subsurface scattering, catchlight in eyes",
|
|
68
|
+
"macro": "Canon EOS R5, Canon RF 100mm f/2.8L Macro IS USM, 1.4x magnification, razor-sharp micro details",
|
|
69
|
+
"architectural": "Sony A7R V, Sony FE 16-35mm f/2.8 GM II, architectural perspective correction, rectilinear sharpness",
|
|
70
|
+
"cyberpunk": "RED V-Raptor 8K VV, Zeiss Master Prime 50mm T1.3, blue streak anamorphic flares, diffused volumetric neon glow"
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
LIGHTING_PROFILES = {
|
|
74
|
+
"golden_hour": "Warm low-angle sun, long dramatic shadows, atmospheric golden haze, volumetric god rays",
|
|
75
|
+
"cybernetic_neon": "Bioluminescent cyan and electric violet rim lighting, high-contrast dark environment, diffused reflection",
|
|
76
|
+
"studio_high_key": "Clean 3-point softbox lighting, 5600K daylight balanced, crisp white reflections, zero harsh shadows",
|
|
77
|
+
"dramatic_noir": "Chiaroscuro, single key rim light, deep crushing blacks, haze and dust motes illuminated in beams",
|
|
78
|
+
"tech_cleanroom": "Recessed linear LED ceiling panels, sterile cool 6500K diffuse illumination, polished floor reflections"
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
CAMERA_MOTIONS = [
|
|
82
|
+
"Slow cinematic push-in (dolly track) accelerating into a hyper-dynamic tracking shot",
|
|
83
|
+
"360-degree orbital sweep around the subject with subtle vertigo Zolly focal zoom",
|
|
84
|
+
"Smooth low-altitude FPV drone flythrough skimming millimetres above the surface",
|
|
85
|
+
"Top-down 90-degree crane drop transitioning to eye-level heroic reveal",
|
|
86
|
+
"Handheld cinema verite with subtle organic camera shake and whip-pan transition"
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def generate_video_prompt(
|
|
91
|
+
cls,
|
|
92
|
+
topic: str,
|
|
93
|
+
style: str = "cinematic",
|
|
94
|
+
duration: int = 5,
|
|
95
|
+
camera_work: Optional[str] = None,
|
|
96
|
+
lighting: Optional[str] = None,
|
|
97
|
+
audio_mood: Optional[str] = None
|
|
98
|
+
) -> VideoPromptSpec:
|
|
99
|
+
"""Synthesize high-fidelity prompt for Sora, Kling, Runway Gen-3, Luma."""
|
|
100
|
+
chosen_camera = camera_work or cls.CAMERA_MOTIONS[0]
|
|
101
|
+
chosen_light = lighting or cls.LIGHTING_PROFILES.get(style, cls.LIGHTING_PROFILES["cybernetic_neon"] if "cyber" in style else cls.LIGHTING_PROFILES["golden_hour"])
|
|
102
|
+
sfx = audio_mood or "Sub-bass riser crescendo with futuristic mechanical servo clicks and ambient stereo synthesizer"
|
|
103
|
+
|
|
104
|
+
# Build prompt
|
|
105
|
+
prompt_parts = [
|
|
106
|
+
f"Cinematic 8K masterpiece video of {topic}.",
|
|
107
|
+
f"Visual Dynamics: Hyper-detailed, realistic motion physics, photorealistic rendering with 60fps shutter motion blur.",
|
|
108
|
+
f"Camera Direction: {chosen_camera}.",
|
|
109
|
+
f"Lighting & Atmosphere: {chosen_light}.",
|
|
110
|
+
f"Color & Tone: 35mm film grain, cinematic Kodak Vision3 500T color grading, HDR 10-bit wide color gamut.",
|
|
111
|
+
f"No jitter, no morphing artifacts, seamless fluid transitions, professional movie cinematography."
|
|
112
|
+
]
|
|
113
|
+
full_prompt = " ".join(prompt_parts)
|
|
114
|
+
|
|
115
|
+
negative = "low quality, blurry, deformed, morphing, glitchy, oversaturated, amateur video, watermark, text overlay, stuttering frames"
|
|
116
|
+
|
|
117
|
+
return VideoPromptSpec(
|
|
118
|
+
tool="Sora / Kling 1.5 / Runway Gen-3 / Luma Dream Machine",
|
|
119
|
+
prompt=full_prompt,
|
|
120
|
+
negative_prompt=negative,
|
|
121
|
+
camera_movement=chosen_camera,
|
|
122
|
+
lighting=chosen_light,
|
|
123
|
+
fps=60,
|
|
124
|
+
aspect_ratio="16:9",
|
|
125
|
+
duration_seconds=duration,
|
|
126
|
+
audio_sfx_cue=sfx
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
@classmethod
|
|
130
|
+
def generate_photo_prompt(
|
|
131
|
+
cls,
|
|
132
|
+
subject: str,
|
|
133
|
+
style: str = "portrait",
|
|
134
|
+
lens_type: str = "cinematic",
|
|
135
|
+
lighting_style: str = "golden_hour",
|
|
136
|
+
aspect_ratio: str = "16:9",
|
|
137
|
+
negative_extra: str = ""
|
|
138
|
+
) -> PhotoPromptSpec:
|
|
139
|
+
"""Synthesize ultra-photorealistic image generation prompt for Midjourney v6.1 / Flux.1."""
|
|
140
|
+
lens = cls.LENS_PROFILES.get(lens_type, cls.LENS_PROFILES["cinematic"])
|
|
141
|
+
lighting = cls.LIGHTING_PROFILES.get(lighting_style, cls.LIGHTING_PROFILES["golden_hour"])
|
|
142
|
+
|
|
143
|
+
prompt_core = (
|
|
144
|
+
f"Award-winning editorial photograph of {subject}. "
|
|
145
|
+
f"Captured with {lens}. "
|
|
146
|
+
f"Lighting: {lighting}. "
|
|
147
|
+
f"Hyper-detailed textures, ray-traced reflections, authentic skin and material pores, natural chromatic dispersion. "
|
|
148
|
+
f"Masterpiece composition, Vogue / National Geographic award winner, shot on 35mm film, uncompressed RAW capture."
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
neg = "cgi, 3d render, plastic skin, anime, illustration, bad anatomy, deformed limbs, blurry, low resolution, watermark, signature"
|
|
152
|
+
if negative_extra:
|
|
153
|
+
neg += f", {negative_extra}"
|
|
154
|
+
|
|
155
|
+
params = f"--ar {aspect_ratio} --v 6.1 --style raw --stylize 250"
|
|
156
|
+
|
|
157
|
+
return PhotoPromptSpec(
|
|
158
|
+
engine="Midjourney v6.1 / Flux.1 Pro / Imagen 3",
|
|
159
|
+
prompt=prompt_core,
|
|
160
|
+
negative_prompt=neg,
|
|
161
|
+
camera_lens=lens,
|
|
162
|
+
lighting_setup=lighting,
|
|
163
|
+
color_grade="Kodak Portra 400 Color Science",
|
|
164
|
+
aspect_ratio=aspect_ratio,
|
|
165
|
+
parameters=params
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
@classmethod
|
|
169
|
+
def generate_launch_storyboard(
|
|
170
|
+
cls,
|
|
171
|
+
product_name: str,
|
|
172
|
+
core_feature: str,
|
|
173
|
+
metric_highlight: str = "95% Token Reduction & 0 Hallucinations",
|
|
174
|
+
target_audience: str = "AI Engineers, Tech Leads & DevOps"
|
|
175
|
+
) -> List[StoryboardScene]:
|
|
176
|
+
"""Creates a viral 5-scene 30-second tech launch video storyboard."""
|
|
177
|
+
scenes = [
|
|
178
|
+
StoryboardScene(
|
|
179
|
+
scene_number=1,
|
|
180
|
+
timecode="00:00 - 00:05",
|
|
181
|
+
scene_title="The Hook: Context Window Overload",
|
|
182
|
+
visual_description="A frustrated AI developer at a futuristic multi-monitor battlestation. Red warning alerts flash: 'CONTEXT LIMIT EXCEEDED - 100K TOKENS WASTED'. Holographic code flies chaotically out of control.",
|
|
183
|
+
camera_direction="Fast macro zoom onto the developer's intense eyes reflecting red code cascades, camera pans back violently.",
|
|
184
|
+
voiceover_script="Your AI agents are choking on bloated codebases, burning millions of tokens and hallucinating fake functions.",
|
|
185
|
+
on_screen_text="STOP WASTING TOKENS",
|
|
186
|
+
audio_sfx="Heavy low-pass glitch beat, distorted digital alarm, sub-bass drop.",
|
|
187
|
+
video_prompt="Cinematic shot of dark neon office, developer facing glowing red holographic terminals flashing 'ERROR', camera fast zoom into eyes, 8k, photorealistic, anamorphic lens flare."
|
|
188
|
+
),
|
|
189
|
+
StoryboardScene(
|
|
190
|
+
scene_number=2,
|
|
191
|
+
timecode="00:05 - 00:11",
|
|
192
|
+
scene_title="The Paradigm Shift: T-Zero Ingestion",
|
|
193
|
+
visual_description=f"A sleek metallic cube engraved with the glowing cyan '{product_name}' logo activates. Laser scanning beams pulse across the messy code forest, pruning 95% of fluff instantly into pure crystal AST signatures.",
|
|
194
|
+
camera_direction="Dynamic 360-degree orbital sweep around the glowing T-Zero core as shockwave ripples outward.",
|
|
195
|
+
voiceover_script=f"Meet {product_name}: The world's first deterministic AST context compressor and reality-lock engine.",
|
|
196
|
+
on_screen_text=f"ENTER {product_name.upper()}",
|
|
197
|
+
audio_sfx="Futuristic laser initialization sweep, high-frequency crystal resonance, metallic lock-in click.",
|
|
198
|
+
video_prompt=f"Futuristic dark studio, glowing cyan quantum cube labeled '{product_name}' emitting coherent blue laser lattice, compressing chaotic code into crystal lattices, cinematic, 60fps."
|
|
199
|
+
),
|
|
200
|
+
StoryboardScene(
|
|
201
|
+
scene_number=3,
|
|
202
|
+
timecode="00:11 - 00:18",
|
|
203
|
+
scene_title="The Core Tech: Zero-Leak & Reality-Lock",
|
|
204
|
+
visual_description="Split holographic HUD. Left side: Zero-Leak Security Shield scanning secrets in real time. Right side: Immutable AST Grounding Contract locking Claude, Cursor, and ChatGPT into zero-hallucination reality.",
|
|
205
|
+
camera_direction="Split-screen horizontal slide tracking forward with volumetric light beams between the two panels.",
|
|
206
|
+
voiceover_script="Pre-flight reality locks guarantee zero hallucinations before writing code, backed by 100% Zero-Leak security.",
|
|
207
|
+
on_screen_text="100% REALITY-LOCK | ZERO LEAK",
|
|
208
|
+
audio_sfx="Crisp mechanical shutter snaps, data transfer swooshes, positive validation chord.",
|
|
209
|
+
video_prompt="Holographic cybernetic dashboard floating in mid-air displaying green checkmarks, AST hierarchy tree glowing neon green, cinematic depth of field, high-tech interface, 8k."
|
|
210
|
+
),
|
|
211
|
+
StoryboardScene(
|
|
212
|
+
scene_number=4,
|
|
213
|
+
timecode="00:18 - 00:25",
|
|
214
|
+
scene_title="The Breakthrough: Provable ROI & Speed",
|
|
215
|
+
visual_description=f"A vibrant 3D holographic telemetry graph explodes with stats: '{metric_highlight}', 10x faster inference, $0 API cost on local engine. Millions of raw tokens shrink to compact gold AST tokens.",
|
|
216
|
+
camera_direction="Ascending crane shot rising above the metric towers, lens catching golden volumetric light flare.",
|
|
217
|
+
voiceover_script="Cut context window costs by up to 95%, speed up agent loops by 10x, and keep your intellectual property offline.",
|
|
218
|
+
on_screen_text=f"PROVEN: {metric_highlight.upper()}",
|
|
219
|
+
audio_sfx="Uplifting electronic synthesizer build-up, punchy acoustic kick, crowd whisper.",
|
|
220
|
+
video_prompt="Glowing golden bar charts and telemetry data rising from dark reflective glass floor, numbers counting up rapidly, cinematic cinematic lighting, golden hour rays, 8k."
|
|
221
|
+
),
|
|
222
|
+
StoryboardScene(
|
|
223
|
+
scene_number=5,
|
|
224
|
+
timecode="00:25 - 00:30",
|
|
225
|
+
scene_title="Call to Action: Launch with T-Zero",
|
|
226
|
+
visual_description=f"Heroic lockup of '{product_name}' logo, URL, and VS Code / Cursor / Windsurf / Antigravity integration icons. A single terminal command glows: 'npx -y tzero-mcp@latest'.",
|
|
227
|
+
camera_direction="Gentle slow push-in, fading smoothly to solid obsidian background with subtle particle aura.",
|
|
228
|
+
voiceover_script=f"Transform your autonomous AI coding stack today. Install {product_name} in 30 seconds.",
|
|
229
|
+
on_screen_text=f"npx -y {product_name.lower()}-mcp@latest\ngithub.com/toprakahmetaydogmus/TZeroAlgorithm",
|
|
230
|
+
audio_sfx="Subwoofer final hit, pristine chime decay, silence.",
|
|
231
|
+
video_prompt=f"Minimalist luxury tech reveal, glowing cyan '{product_name}' logo on matte titanium surface, soft ambient studio lighting, clean terminal prompt, 8k resolution."
|
|
232
|
+
)
|
|
233
|
+
]
|
|
234
|
+
return scenes
|
|
235
|
+
|
|
236
|
+
@classmethod
|
|
237
|
+
def synthesize_from_code(cls, code: str, file_name: str = "module.py") -> Dict[str, Any]:
|
|
238
|
+
"""Analyzes code AST and synthesizes matched video and photo campaign prompts."""
|
|
239
|
+
symbols = []
|
|
240
|
+
docstrings = []
|
|
241
|
+
is_security = False
|
|
242
|
+
is_ai = False
|
|
243
|
+
is_db = False
|
|
244
|
+
|
|
245
|
+
code_lower = code.lower()
|
|
246
|
+
if any(w in code_lower for w in ["token", "compress", "ast", "prompt", "llm"]):
|
|
247
|
+
is_ai = True
|
|
248
|
+
if any(w in code_lower for w in ["secret", "leak", "security", "guard", "crypto", "auth"]):
|
|
249
|
+
is_security = True
|
|
250
|
+
if any(w in code_lower for w in ["db", "sqlite", "cache", "store", "query", "sql"]):
|
|
251
|
+
is_db = True
|
|
252
|
+
|
|
253
|
+
try:
|
|
254
|
+
tree = ast.parse(code)
|
|
255
|
+
for node in ast.walk(tree):
|
|
256
|
+
if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef)):
|
|
257
|
+
symbols.append(node.name)
|
|
258
|
+
doc = ast.get_docstring(node)
|
|
259
|
+
if doc:
|
|
260
|
+
docstrings.append(doc.splitlines()[0])
|
|
261
|
+
except Exception:
|
|
262
|
+
symbols = [line.strip().split()[1] for line in code.splitlines() if line.strip().startswith(("def ", "class "))]
|
|
263
|
+
|
|
264
|
+
# Determine theme
|
|
265
|
+
if is_security:
|
|
266
|
+
theme = "Autonomous Cyber-Security Sentinel & Zero-Leak Shield"
|
|
267
|
+
style = "cyberpunk"
|
|
268
|
+
lighting = "cybernetic_neon"
|
|
269
|
+
elif is_ai:
|
|
270
|
+
theme = "Quantum AST Compression Engine & Neural Token Optimizer"
|
|
271
|
+
style = "cinematic"
|
|
272
|
+
lighting = "golden_hour"
|
|
273
|
+
elif is_db:
|
|
274
|
+
theme = "Sub-Millisecond High-Throughput Data Backbone"
|
|
275
|
+
style = "architectural"
|
|
276
|
+
lighting = "tech_cleanroom"
|
|
277
|
+
else:
|
|
278
|
+
theme = f"Elite Developer Utility Architecture ({file_name})"
|
|
279
|
+
style = "cinematic"
|
|
280
|
+
lighting = "golden_hour"
|
|
281
|
+
|
|
282
|
+
top_symbols = ", ".join(symbols[:5]) if symbols else "Core Architecture"
|
|
283
|
+
|
|
284
|
+
video_spec = cls.generate_video_prompt(
|
|
285
|
+
topic=f"Future of AI computing: {theme} executing operations with symbols ({top_symbols})",
|
|
286
|
+
style=style,
|
|
287
|
+
lighting=cls.LIGHTING_PROFILES.get(lighting)
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
photo_spec = cls.generate_photo_prompt(
|
|
291
|
+
subject=f"Futuristic physical AI supercomputer server processing {theme}, glowing fiber optics, titanium chassis",
|
|
292
|
+
style="cinematic",
|
|
293
|
+
lens_type="cinematic",
|
|
294
|
+
lighting_style=lighting
|
|
295
|
+
)
|
|
296
|
+
|
|
297
|
+
storyboard = cls.generate_launch_storyboard(
|
|
298
|
+
product_name="T-Zero",
|
|
299
|
+
core_feature=theme,
|
|
300
|
+
metric_highlight="95% Context Compression & 0 Hallucinations"
|
|
301
|
+
)
|
|
302
|
+
|
|
303
|
+
return {
|
|
304
|
+
"file_name": file_name,
|
|
305
|
+
"detected_theme": theme,
|
|
306
|
+
"extracted_symbols": symbols[:10],
|
|
307
|
+
"video_spec": {
|
|
308
|
+
"engine": video_spec.tool,
|
|
309
|
+
"prompt": video_spec.prompt,
|
|
310
|
+
"negative_prompt": video_spec.negative_prompt,
|
|
311
|
+
"camera_movement": video_spec.camera_movement,
|
|
312
|
+
"audio_cue": video_spec.audio_sfx_cue
|
|
313
|
+
},
|
|
314
|
+
"photo_spec": {
|
|
315
|
+
"engine": photo_spec.engine,
|
|
316
|
+
"prompt": photo_spec.prompt,
|
|
317
|
+
"negative_prompt": photo_spec.negative_prompt,
|
|
318
|
+
"camera_lens": photo_spec.camera_lens,
|
|
319
|
+
"parameters": photo_spec.parameters
|
|
320
|
+
},
|
|
321
|
+
"storyboard_scenes": [
|
|
322
|
+
{
|
|
323
|
+
"scene": s.scene_number,
|
|
324
|
+
"timecode": s.timecode,
|
|
325
|
+
"title": s.scene_title,
|
|
326
|
+
"visual": s.visual_description,
|
|
327
|
+
"voiceover": s.voiceover_script,
|
|
328
|
+
"text": s.on_screen_text,
|
|
329
|
+
"prompt": s.video_prompt
|
|
330
|
+
}
|
|
331
|
+
for s in storyboard
|
|
332
|
+
]
|
|
333
|
+
}
|